style: linter

This commit is contained in:
Christian Visintin
2026-03-13 15:24:43 +01:00
parent a24039bf15
commit 9387f11863
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -41,9 +41,7 @@ impl TryFrom<&Args> for RemoteArgs {
(_, _) => Err("Too many arguments".to_string()), (_, _) => Err("Too many arguments".to_string()),
}?; }?;
// parse bookmark first // parse bookmark first
let last_item_index = (args.bookmark.len() + args.positional.len()) let last_item_index = (args.bookmark.len() + args.positional.len()).saturating_sub(1);
.checked_sub(1)
.unwrap_or_default();
let mut hosts = vec![]; let mut hosts = vec![];
@@ -240,7 +240,7 @@ impl MockComponent for FileList {
} }
State::One(StateValue::Usize(if self.has_dot_dot() { State::One(StateValue::Usize(if self.has_dot_dot() {
self.states.list_index.checked_sub(1).unwrap_or_default() self.states.list_index.saturating_sub(1)
} else { } else {
self.states.list_index self.states.list_index
})) }))