Hi guys, I’m trying to import a sibling module while keeping the namespace and failing hard. My directory structure is:
/src ├── lib.rs ├── math.rs └── terrain.rs
I’m trying to grab the functions from
math.rs so I can do something like
math::lerp() instead of importing all the functions into the namespace (like
I already added
mod math in
lib.rs. I’ve tried using
use math; and
use crate::math, etc. but I always get some error about type ascription or using an undefined module. I’m on Rust 1.35.
I think I’ve been at this for about an hour now, can it be done?