mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-07 08:45:24 +02:00
Wrap long line of code (#312)
This line was too big to show during class.
This commit is contained in:
parent
476ee283c6
commit
a07bfa108f
@ -5,7 +5,10 @@
|
|||||||
```rust,editable
|
```rust,editable
|
||||||
fn main() {
|
fn main() {
|
||||||
let primes = vec![2, 3, 5, 7];
|
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<_>>();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user