Merge pull request #1179 from Nihilism0/patch-2

fix The sample code does not match the description
pull/1181/head
Sunface 2 years ago committed by GitHub
commit 69fd67d18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -148,7 +148,7 @@ println!("{:#?}", array);
**正确的写法**,应该调用`std::array::from_fn` **正确的写法**,应该调用`std::array::from_fn`
```rust ```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); println!("{:#?}", array);
``` ```

Loading…
Cancel
Save