News for hackers. Stuff that matters.
Re:Death to C by steveklabnik on Saturday May 02, 2015 @10:16AM (#9477123)
Glad you're having a good time with Rust. :) One small note:

> if you want to pass a &str to a function, but have a String

You can just add a & to your String. &String coerces to &str. Deref coercions are one of the few places where Rust does an implicit coercion: http://doc.rust-lang.org/nightly/book/deref-coercions.html

Re:Death to C by cornstalks on Saturday May 02, 2015 @10:43AM (#9477235)
Ah, cool, that's much better! Is that relatively new? I swear you had to do &* if you had a String and & if you had a &String.

Edit: Ah, here: https://github.com/rust-lang/rfcs/blob/master/text/0241-dere...

Re:Death to C by steveklabnik on Saturday May 02, 2015 @10:57AM (#9477288)
It's not only new, but there wasn't any user-facing documentation until a few weeks ago. I'd been waiting to make changes to the book until after beta, and the re-organization of the TOC I did made me realize that I was missing a few things, this and UFCS being the primary two.