Explain runtime invariants and avoid redundant unwraps
This commit is contained in:
1 parent
34f2f07301
commit
1b51ba83b4
116 files changed
+1643
-515
No files matched your search
@@ -295,7 +295,7 @@ impl FereseShell {
|
||||
let current = Mode::ALL
|
||||
.iter()
|
||||
.position(|mode| *mode == self.display_mode.selected)
|
||||
.unwrap();
|
||||
.expect("Mode::ALL contains every selectable display mode");
|
||||
let mode = match key {
|
||||
Key::Character(character) => character
|
||||
.parse::<usize>()
|
||||
|
||||
Reference in new issue
Block a user