We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bfdd3c commit 815ffa1Copy full SHA for 815ffa1
iterators/src/main.rs
@@ -2,11 +2,7 @@ use std::string::FromUtf8Error;
2
3
fn main() -> Result<(), FromUtf8Error> {
4
let v = [&b"1"[..], &*b"22", b"1"];
5
- for s in v
6
- .into_iter()
7
- .filter_map(|v| String::from_utf8(v.into()).ok())
8
- {
9
- println!("{}", s)
10
- }
+ v.into_iter()
+ .filter_map(|v| String::from_utf8(v.into()).ok());
11
Ok(())
12
}
0 commit comments