4 ms·
The example io-basic-error-custom and the first version of error-impl have the same content but different names, while the reference just above the
by madez 11y ago
The example
io-basic-error-custom
and the first version of
error-impl
have the same content but different names, while the reference just above the first version of the latter points to the former.
Is this intentional? It confused me for a second.
I know this is nitpicking, just asking.
And, thank you steveklabnik, pcwalton, and other contributors of Rust for working in the open and answering our questions here. Thank you burntsushi for your great post.
- burntsushi 11y agoAh, hmm. They have different content. error-impl: https://github.com/BurntSushi/blog/blob/master/code/rust-error-handling/src/bin/error-impl.rs https://github.com/BurntSushi/blog/blob/master/code/rust-err... io-basic-error-custom: https://github.com/BurntSushi/blog/blob/master/code/rust-error-handling/src/bin/io-basic-error-custom.rs https://github.com/BurntSushi/blog/blob/master/code/rust-err... The key is that the code is spread out over multiple blocks in the article. I need a better literate programming tool than hacky Python...
- madez 11y agoI looked at it again and now I see that the code examples don't necessarily constitute the whole file. And the parts in question happen to be the same in both files. My fault. Maybe it would be interesting for the reader to see the number of the lines of the shown code, something like "error-impl.rs, lines 3-12 out of 51".
- burntsushi 11y agoYeah, that would be a nice improvement. Some day, I will need to improve my literate programming tool: https://github.com/BurntSushi/blog/blob/master/scripts/rust-from-blog https://github.com/BurntSushi/blog/blob/master/scripts/rust-... :P