How do I import a mod into rust?
1) I have a file with these contents:
this_is_stupid.rs
pub mod fix_me {
use crate::InputData;
pub trait Wow {
fn findMe(&self);
}
//impl InputData {
impl Wow for InputData {
fn findMe(&self) {
print!("Really dudes we are working?");
}
} //end impl
} // mod
In my main I have this:
pub mod this_is_stupid;
use crate::this_is_stupid::fix_me;
pub struct InputData {}
fn main() {
let input_data: InputData{};
fix_me::Wow::findMe();
}
Here is my error:
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
--> src/main.rs:85:9
|
85 | fix_me::Wow::findMe();
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter
|
::: src/this_is_stupid.rs:12:9
|
12 | fn findMe(&self);
| ----------------- defined here