Comment

Comment by okey

As the post you are responding to pointed out, String::from converts from a string slice to a String. You didn't do this.

Your code fails to compile because it attempts to apply + to two string slices, and that is not implemented. @deathanatos also mentioned that.

You might find the Rust book page on Strings helpful: https://doc.rust-lang.org/book/strings.html

parent okey 9 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton