chore: 修正错别字

This commit is contained in:
Chloroplast 2022-08-21 17:23:42 +08:00 committed by GitHub
parent d334367182
commit 3d30b81b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ fn main() {
};
// 通过这种解构式模式匹配person.name 的所有权被转移给新的变量 `name`
// 但是,这里 `age` 变量是对 person.age 的引用, 这里 ref 的使用相当于: let age = &person.age
// 但是,这里 `age` 变量是对 person.age 的引用, 这里 ref 的使用相当于: let age = &person.age
let Person { name, ref age } = person;
println!("The person's age is {}", age);