Our great sponsors
-
chalk
An implementation and definition of the Rust trait system using a PROLOG-like logic solver (by rust-lang)
For me an attempt to write where HashMap: FromIterator and then use new and insert was totally bizzare because currently rustc is pretty primitive and doesn't do super-complex machinery needed to do what you want. Chalk may fix that one day, but it's nowhere near to being ready for inclusion into rustc thus I wouldn't even attempt to do what you tried to do… but that's not something you are supposed to know before reading this book!
-
I actually hope in 2nd edition /u/Jonhoo would dedicate a separate page or two for this issue. I mean: when I first saw how you can replace where BufReader: ReadNumeric + ReadNumeric into here BufReader: ReadNumeric + ReadNumeric and turn code which fails to compile into something that actually does compile… I was kinda… WTH? Isn't where A: X + Y and where A: Y + X always mean the same thing? Yet, apparently, for an existing compiler the answer is “no” (and it's not trivial to fix).
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.