Two executables' sources, foo.rs
and bar.rs
, are located in src/bin
.
Private common functionality exists in src/bin/common.rs
.
foo.rs
and bar.rs
include this functionality with:
mod common;
use common::{Bish, Bash, Bosh};
This works, but src/bin/common.rs
doesn't feel like the right path for something which isn't going to be built into an executable.
Moving common.rs
to src
or src/lib
stops foo.rs
and bar.rs
from seeing it.
Where should I put common.rs
and how do I then import it?