sample-code: Remove "Student" function from match_test

This commit is contained in:
John 2025-07-18 05:35:57 -04:00
parent 2f94ddd23f
commit 4f40bd4f99

View File

@ -5,10 +5,6 @@ struct Student {
age: i32,
}
fn Student(name: str, age: i32) -> Student {
Student { name, age }
}
fn match_test(student: Student) {
match student {
Student { name: "shark", age } => println("Found a shark of ", age, " year(s)"),