Created
January 15, 2018 18:21
-
-
Save maretekent/0d9febff912f38b07285f5ed4b83e382 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[allow(non_snake_case)] | |
mod myMod { | |
#[allow(dead_code)] | |
pub struct Mammals<T>{ | |
pub somedata: T, | |
} | |
impl<T> Mammals<T> { | |
pub fn new(somedata: T) -> Mammals<T> { | |
Mammals { | |
somedata: somedata, | |
} | |
} | |
} | |
} | |
fn main(){ | |
let _cat = myMod::Mammals::new("My first Mammal is created..."); | |
println!("Our new action: {}", _cat.somedata); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment