Closed andrewzah closed 4 years ago
I haven't used Clippy at all (aside from the Microsoft one), so I'll check out what it does. I was just reading the Rust book on code organization yesterday, and have a WIP branch here: https://github.com/tobymurray/mr_splashy_pants/tree/make-interface-less-bad which has a code reorganization that tackles a tiny bit of this (in particular using the mod.rs
) files.
I have to say, I'm still not confident I could write well organized code within the Rust module system without looking it up. It seems weirdly complicated (particularly because half the internet is still referencing the 2015 style).
I'll poke through this when I get a chance - thanks for taking the time!
I've addressed a handful of the Clippy findings (not the mod.rs
ones) in 09f6d0c, obviously giving this branch a bit of grief. I'll keep looking through the other changes.
This PR does a few things, namely:
<name>.rs
with contentspub mod <name>
to<name>/mod.rs
. I.e. instead ofresponse.rs
with areponse/
folder, it now hasresponse/mod.rs
. This is more idiomatic rust.cargo clippy
, namely just removing redundantreturn
statements, etc.use
statements.