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 lerp()).
I already added mod math in lib.rs. I've tried using use super::math, 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?
Sorry, I forgot to mention it was inside terrain. I did a hard reset in git and used use super::math and now it works. Maybe I was doing something else wrong Thanks for the help!