diff --git a/listings/ch07-managing-growing-projects/listing-07-03/src/lib.rs b/listings/ch07-managing-growing-projects/listing-07-03/src/lib.rs index 0b8a43c..783b57d 100644 --- a/listings/ch07-managing-growing-projects/listing-07-03/src/lib.rs +++ b/listings/ch07-managing-growing-projects/listing-07-03/src/lib.rs @@ -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(); } diff --git a/listings/ch07-managing-growing-projects/listing-07-05/src/lib.rs b/listings/ch07-managing-growing-projects/listing-07-05/src/lib.rs index 05372db..7325a85 100644 --- a/listings/ch07-managing-growing-projects/listing-07-05/src/lib.rs +++ b/listings/ch07-managing-growing-projects/listing-07-05/src/lib.rs @@ -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(); } diff --git a/listings/ch07-managing-growing-projects/listing-07-07/src/lib.rs b/listings/ch07-managing-growing-projects/listing-07-07/src/lib.rs index 7b89ee7..7063ad8 100644 --- a/listings/ch07-managing-growing-projects/listing-07-07/src/lib.rs +++ b/listings/ch07-managing-growing-projects/listing-07-07/src/lib.rs @@ -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(); } diff --git a/listings/ch07-managing-growing-projects/listing-07-09/src/lib.rs b/listings/ch07-managing-growing-projects/listing-07-09/src/lib.rs index 92c4695..61c13cc 100644 --- a/listings/ch07-managing-growing-projects/listing-07-09/src/lib.rs +++ b/listings/ch07-managing-growing-projects/listing-07-09/src/lib.rs @@ -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"); }