About pub(crate)
vs crate
: I think pub(crate)
is better. It’s consistent with pub(super)
. Also, crate
is just Rust’s equivalent to what other languages call package
. It’d look weird to use package
in that position, so I don’t see why using crate
in that position should be any less weird. I’d prefer to stick with pub
, pub(crate)
and pub(super)
.
13 Likes