You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use nix::sys::termios::{
cfgetospeed, tcgetattr
};fnmain(){let stdin = std::io::stdin();let termios = tcgetattr(stdin).expect("Could not get terminal attributes");let speed = cfgetospeed(&termios);println!("{:?}", speed);}
We receive:
> cargo run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/demo`
thread 'main' panicked at /home/jak/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.30.1/src/sys/termios.rs:767:70:
called `Result::unwrap()` on an `Err` value: EINVAL
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace