for example, I have a file structure that looks like this:
action/
attack.rs
attack.test.rs
mod.rs
But this doesn't work in the mod file:
pub mod attack.test;
and neither does:
pub mod "attack.test";
for example, I have a file structure that looks like this:
action/
attack.rs
attack.test.rs
mod.rs
But this doesn't work in the mod file:
pub mod attack.test;
and neither does:
pub mod "attack.test";
2 Comments
francorbacho@lemmy.world · 9 pts · 3y
Dots are not allowed. If it's not too much code, you can use inline modules, otherwise you have to stick to:
And then:
nerdblood@programming.dev · 3 pts · 3y
Thanks, yeah it felt like too many tests to keep in file. I can live with that directory approach. TY!