Fix clippy::match-wildcard-for-single-variants

This commit is contained in:
Héctor Ramón Jiménez 2023-09-20 05:03:25 +02:00
parent 42ed90bc6f
commit caed50b277
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 41 additions and 11 deletions

View file

@ -117,7 +117,7 @@ impl Direction {
match self {
Self::Horizontal(properties) => Some(properties),
Self::Both { horizontal, .. } => Some(horizontal),
_ => None,
Self::Vertical(_) => None,
}
}
@ -126,7 +126,7 @@ impl Direction {
match self {
Self::Vertical(properties) => Some(properties),
Self::Both { vertical, .. } => Some(vertical),
_ => None,
Self::Horizontal(_) => None,
}
}
}

View file

@ -56,7 +56,7 @@ impl Cursor {
State::Selection { start, end } => {
Some((start.min(end), start.max(end)))
}
_ => None,
State::Index(_) => None,
}
}
@ -89,7 +89,7 @@ impl Cursor {
match self.state(value) {
State::Index(index) if index > 0 => self.move_to(index - 1),
State::Selection { start, end } => self.move_to(start.min(end)),
_ => self.move_to(0),
State::Index(_) => self.move_to(0),
}
}