9
Can I not use dot in filename for a Rust module?
(programming.dev)
Dots are not allowed. If it's not too much code, you can use inline modules, otherwise you have to stick to:
action/
attack/test/
mod.rs
And then:
mod attack::test;
Thanks, yeah it felt like too many tests to keep in file. I can live with that directory approach. TY!
You might be able to do it using a #[path("attack.test.rs")]
attribute.
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits