X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/375923e203d323dadc639434ebc1f29530f4ac2a..2eb15e9ad4c5f980bb007347146568fd41223011:/src/part03.rs diff --git a/src/part03.rs b/src/part03.rs index 2a5eb16..44431e6 100644 --- a/src/part03.rs +++ b/src/part03.rs @@ -30,7 +30,7 @@ fn read_vec() -> Vec { //@ concurrently, that also reads from standard input? The result would be a mess. Hence //@ Rust requires us to `lock` standard input if we want to perform large operations on //@ it. (See [the documentation](https://doc.rust-lang.org/stable/std/io/struct.Stdin.html) for - //@ more details.) + //@ more details.) for line in stdin.lock().lines() { // Rust's type for (dynamic, growable) strings is `String`. However, our variable `line` // here is not yet of that type: It has type `io::Result`.