You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-11-30 00:58:23 +02:00
Replace closure map example with direct calls (#2679)
This commit is contained in:
@@ -16,10 +16,12 @@ fn main() {
|
|||||||
v
|
v
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
println!(
|
|
||||||
"clamped values at {max_value}: {:?}",
|
dbg!(clamp(1));
|
||||||
(0..10).map(clamp).collect::<Vec<_>>()
|
dbg!(clamp(3));
|
||||||
);
|
dbg!(clamp(5));
|
||||||
|
dbg!(clamp(7));
|
||||||
|
dbg!(clamp(10));
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user