1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-05 16:10:31 +02:00

Wrap long line of code (#312)

This line was too big to show during class.
This commit is contained in:
Martin Geisler 2023-02-01 12:34:10 +01:00 committed by GitHub
parent 476ee283c6
commit a07bfa108f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,10 @@
```rust,editable
fn main() {
let primes = vec![2, 3, 5, 7];
let prime_squares = primes.into_iter().map(|prime| prime * prime).collect::<Vec<_>>();
let prime_squares = primes
.into_iter()
.map(|prime| prime * prime)
.collect::<Vec<_>>();
}
```