split the lib.rs main file into submodules for easier navigation and separation of concerns:
lib.rs
rawsmallvec.rs
taggedlen.rs
serde.rs
drain.rs
extractif.rs
...
...
the modules should have clear API boundaries, no ad-hoc splitting. e.g.:
- another type with its methods:
TaggedLen, RawSmallVec
- features:
serde, specialization
key rule: a file has one purpose and touches one part of the code
key rule: if you have to make a mod {/*...*/} item, then it probably should be its own file
split the
lib.rsmain file into submodules for easier navigation and separation of concerns:the modules should have clear API boundaries, no ad-hoc splitting. e.g.:
TaggedLen,RawSmallVecserde,specializationkey rule: a file has one purpose and touches one part of the code
key rule: if you have to make a
mod {/*...*/}item, then it probably should be its own file