rust/tests/ui/nll/issue-21114-kixunil.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
323 B
Rust
Raw Normal View History

// check-pass
fn from_stdin(min: u64) -> Vec<u64> {
use std::io::BufRead;
let stdin = std::io::stdin();
let stdin = stdin.lock();
stdin.lines()
.map(Result::unwrap)
.map(|val| val.parse())
.map(Result::unwrap)
.filter(|val| *val >= min)
.collect()
}
fn main() {}