15 lines
217 B
Rust
15 lines
217 B
Rust
#[allow(dead_code)]
|
|
#[derive(Debug)]
|
|
struct Person<'a> {
|
|
name: &'a str,
|
|
age: u8,
|
|
}
|
|
|
|
fn main() {
|
|
let name = "Peter";
|
|
let age = 27;
|
|
let peter = Person { name, age };
|
|
|
|
println!("{:#?}", peter);
|
|
}
|