补充章节7.3中示例代码的注释翻译 (#120)

This commit is contained in:
focksor surooi 2022-12-18 11:22:50 +08:00 committed by GitHub
parent 21cf58a9e7
commit 2955e9e11c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -5,9 +5,9 @@ mod front_of_house {
}
pub fn eat_at_restaurant() {
// Absolute path
// 绝对路径
crate::front_of_house::hosting::add_to_waitlist();
// Relative path
// 相对路径
front_of_house::hosting::add_to_waitlist();
}

View File

@ -5,9 +5,9 @@ mod front_of_house {
}
pub fn eat_at_restaurant() {
// Absolute path
// 绝对路径
crate::front_of_house::hosting::add_to_waitlist();
// Relative path
// 相对路径
front_of_house::hosting::add_to_waitlist();
}

View File

@ -5,9 +5,9 @@ mod front_of_house {
}
pub fn eat_at_restaurant() {
// Absolute path
// 绝对路径
crate::front_of_house::hosting::add_to_waitlist();
// Relative path
// 相对路径
front_of_house::hosting::add_to_waitlist();
}

View File

@ -15,13 +15,13 @@ mod back_of_house {
}
pub fn eat_at_restaurant() {
// Order a breakfast in the summer with Rye toast
// 在夏天点一份黑麦面包作为早餐
let mut meal = back_of_house::Breakfast::summer("Rye");
// Change our mind about what bread we'd like
// 更改我们想要的面包
meal.toast = String::from("Wheat");
println!("I'd like {} toast please", meal.toast);
// The next line won't compile if we uncomment it; we're not allowed
// to see or modify the seasonal fruit that comes with the meal
// 如果取消下一行的注释,将会导致编译失败;我们不被允许
// 看到或更改随餐搭配的季节水果
// meal.seasonal_fruit = String::from("blueberries");
}