diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2024-01-11 20:08:57 -0800 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2024-01-11 20:08:57 -0800 |
| commit | e8685c54228ca3337060520f7fbeb5629281764c (patch) | |
| tree | 250be738dce87b6dfa8854b94339deb4095303f7 | |
| parent | 0f01c2aa5cca178ca2c46e512931302b069886af (diff) | |
| download | editor-e8685c54228ca3337060520f7fbeb5629281764c.tar.zst | |
Apply a clippy suggestion.
| -rw-r--r-- | src/term.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/term.rs b/src/term.rs index 54b241c..2e37c65 100644 --- a/src/term.rs +++ b/src/term.rs @@ -109,7 +109,7 @@ pub fn read_key(stdin: &mut BufReader<Stdin>) -> Result<Key, Box<dyn Error>> { // cursor_pos *WILL* fail if the user is typing on the keyboard. Be sure to handle // errors appropriately. pub fn cursor_pos(stdin: &mut BufReader<Stdin>) -> Result<(u16, u16), Box<dyn Error>> { - if stdin.buffer().len() > 0 { + if !stdin.buffer().is_empty() { // If there is any buffered input, the below call to fill_buf will just return the buffered // data and not actually read the terminal response. return Err(Box::from("interrupted")); |
