🎉 initial commit
This commit is contained in:
12
test_data/struct_with_impl.rs.snap
Normal file
12
test_data/struct_with_impl.rs.snap
Normal file
@@ -0,0 +1,12 @@
|
||||
struct Person {
|
||||
name: String,
|
||||
age: u32,
|
||||
}
|
||||
impl Person {
|
||||
fn new(name: String, age: u32) -> Self {
|
||||
Self { name, age }
|
||||
}
|
||||
fn greet(&self) {
|
||||
println!("Hello, my name is {} and I'm {} years old.", self.name, self.age);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user