diff --git a/src/basic/compound-type/array.md b/src/basic/compound-type/array.md index 06ac4c29..fd99d567 100644 --- a/src/basic/compound-type/array.md +++ b/src/basic/compound-type/array.md @@ -148,7 +148,7 @@ println!("{:#?}", array); **正确的写法**,应该调用`std::array::from_fn` ```rust -let array: [String; 8] = core::array::from_fn(|i| String::from("rust is good!")); +let array: [String; 8] = std::array::from_fn(|i| String::from("rust is good!")); println!("{:#?}", array); ```