Feedback for first Rust Program
Feedback for first Rust Program
@such0299 My suggestions:
- For any file location/paths use `PathBuf` & `&Path` as reference - you'd tank me in couple years working on bigger project
- I'm not fan of `Result<_, dyn Error>`, I prefer own error enum with `From<>` for third party error types (`thiserror` crate handles that for us); that way we don't allocate memory just to handle errors.
- Then you `panic!()` in functions that have `Result<>` return type; follow the above and use own error kinds.
1/2