shepmaster / snafu

Easily assign underlying errors into domain-specific errors while adding context
https://docs.rs/snafu/
Apache License 2.0
1.45k stars 61 forks source link

Added multi-file brief example #265

Closed IsaccBarker closed 3 years ago

IsaccBarker commented 3 years ago

Attempts #264

Added a brief example to the documentation about using multiple files. I'm adding this because I don't want others to waste 4 hours of their time like I did mine. I feel like this speaks for itself (correct me if I'm wrong👍).

shepmaster commented 3 years ago

I'm always hesitant to add more details to the top-level documentation. My worry is that if everyone puts the specific pieces that are important to them there, then soon it will contain everything and there's no more organization.

I honestly don't know what is best to help people, so I don't think what you've done is wrong, but I wanted to explain my hesitation about merging it as-is. Is there anywhere in the guide that you think would be reasonable? Do you think this could be related to #212?

IsaccBarker commented 3 years ago

@shepmaster You're right about it being related to #212. I'll stop this pull-request and starting working on a section like that. Do you think it would be fitting to put a direct link to that section on the main page?