Skip to content

Instantly share code, notes, and snippets.

@aalvarado aalvarado/rust1.rs
Created Dec 7, 2015

Embed
What would you like to do?
struct Person;
impl Person {
fn hello(&self) -> &'static str {
return "hello";
}
}
fn main() {
println!("Hello, world!");
let p = Person;
println!("{}", p.hello());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.