I play with a small drawer to generate 2D noise. The following is a simplified snippet of my lib.rs file:
pub mod my_math { pub struct Vec2<T> { ... } ... } pub mod my_noise { use num::Float; use std::num::Wrapping; use my_math::*;
However, when I run the load test , I get the following error:
---- my_noise :: get_noise_white_0 stdout ----
& anon>: error 3: 9: 3:16: unauthorized import my_math::Vec2 . Perhaps extern crate my_math ?
<anon>: 3 use my_math :: Vec2;
I also tried other forms of the use statement in the doc comment, including use my_math::*; and use self::my_math::*; . If I completely delete the line, I get a Vec2 undefined error message.
What is the right way to do this?
module testing documentation rust
heyx3
source share