You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great book! I was just getting started, trying to learn some Rust.
In /hello/print/print_display/testcase_list I was a bit confused about the ? and was wondering why it is needed. I removed all the ? after the write statements, expecting some error to pop up that would make it more clear why these question marks are added. The output was exactly the same as before.
After years of seeing people say all kinds of (mostly nice) things about about rust, I had a hunch that this was not intended. So I installed rust on my laptop and reran the program. Now i got two very clear warnings:
warning: unused `std::result::Result` that must be used
--> main.rs:12:9
|
12 | write!(f, "[");
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_must_use)]` on by default
= note: this `Result` may be an `Err` variant, which should be handled
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
My way of trial and error learning might not be the same as others, but it would definitely have helped me here to see this warning in the output. If others feel the same way I would propose to show warnings. (Maybe below the output and slightly lighter or darker)
The text was updated successfully, but these errors were encountered:
This book uses mdbook to generate the website and there is a limitation within that tool which ignores warnings when you run Rust code blocks. I've made a PR for mdbook that tries to address this issue rust-lang/mdBook#1315.
Thanks for the great book! I was just getting started, trying to learn some Rust.
In
/hello/print/print_display/testcase_list
I was a bit confused about the?
and was wondering why it is needed. I removed all the?
after thewrite
statements, expecting some error to pop up that would make it more clear why these question marks are added. The output was exactly the same as before.After years of seeing people say all kinds of (mostly nice) things about about rust, I had a hunch that this was not intended. So I installed rust on my laptop and reran the program. Now i got two very clear warnings:
My way of trial and error learning might not be the same as others, but it would definitely have helped me here to see this warning in the output. If others feel the same way I would propose to show warnings. (Maybe below the output and slightly lighter or darker)
The text was updated successfully, but these errors were encountered: