-
-
Save pitkley/c581f612225688937cc8b7f3a7deff9a to your computer and use it in GitHub Desktop.
cross issue #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo hello | cargo run | |
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs | |
Running `/target/debug/stdinout` | |
LINE: Ok("hello") | |
$ cross -V | |
cross 0.1.14 | |
cargo 0.25.0-nightly (930f9d949 2017-12-05) | |
$ echo hello | cross run | |
the input device is not a TTY | |
$ # install cross without `-t` flag set | |
$ cross -V | |
cross 0.1.15-dev (974d8c6 2017-12-10) | |
cargo 0.25.0-nightly (930f9d949 2017-12-05) | |
$ echo hello | cross run | |
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs | |
Running `/target/debug/stdinout` | |
LINE: Ok("hello") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::{self, BufRead}; | |
fn main() { | |
let stdin = io::stdin(); | |
for line in stdin.lock().lines() { | |
println!("LINE: {:?}", line); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment