Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
use std::io::{self, Read}; | ||
use crossterm::terminal::{disable_raw_mode, enable_raw_mode}; | ||
This comment has been minimized.
Sorry, something went wrong.
pflenker
Owner
|
||
|
||
fn main() { | ||
enable_raw_mode().unwrap(); | ||
This comment has been minimized.
Sorry, something went wrong.
pflenker
Owner
|
||
for b in io::stdin().bytes() { | ||
let c = b.unwrap() as char; | ||
println!("{}", c); | ||
if c == 'q' { | ||
disable_raw_mode().unwrap(); | ||
This comment has been minimized.
Sorry, something went wrong.
pflenker
Owner
|
||
break; | ||
} | ||
} | ||
|
This was added when we ran
cargo add
and specifies the version ofcrossterm
we want to use. Now this looks like we're setting it to 0.27.0, but Cargo uses Semantic Versioning and considers changes to the right-most version number to be non-breaking. Ifcrossterm
released0.27.1
tomorrow,cargo
would still install it with this configuration.