Compare commits

...

1 Commits

Author SHA1 Message Date
tranquillity-codes 9638945202 Remove unnecessary history is_some checks
6 days ago

@ -239,12 +239,7 @@ impl ReaderState {
self.history_inx = i;
let i: usize = i.unwrap();
let line = h.get(h.len().saturating_sub(i+1));
if line.is_some() {
self.set_line(line.unwrap().to_string());
} else {
bell();
self.redraw();
}
self.set_line(line.unwrap().to_string());
}
fn saved_restore(&mut self) {
@ -267,12 +262,7 @@ impl ReaderState {
}
let i = i.unwrap();
let line = h.get(h.len().saturating_sub(i+1));
if line.is_some() {
self.set_line(line.unwrap().to_string());
} else {
bell();
self.redraw();
}
self.set_line(line.unwrap().to_string());
}
pub fn move_left(&mut self) {

Loading…
Cancel
Save