Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Ah, hmm. They have different content.

error-impl: https://github.com/BurntSushi/blog/blob/master/code/rust-err...

io-basic-error-custom: 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...


I 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".


Yeah, 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-...

:P




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: