summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-20 05:03:25 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-20 05:03:25 +0200
commitcaed50b277495e4375975f3f4e271b8fcbc0c33f (patch)
tree35e20b9c578b22598ca618e0bd34f9b619e7d176 /widget
parent42ed90bc6f92b2085d193e7f143430b8d3847c21 (diff)
downloadiced-caed50b277495e4375975f3f4e271b8fcbc0c33f.tar.gz
iced-caed50b277495e4375975f3f4e271b8fcbc0c33f.tar.bz2
iced-caed50b277495e4375975f3f4e271b8fcbc0c33f.zip
Fix `clippy::match-wildcard-for-single-variants`
Diffstat (limited to 'widget')
-rw-r--r--widget/src/scrollable.rs4
-rw-r--r--widget/src/text_input/cursor.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs
index 4cc97684..49aed2f0 100644
--- a/widget/src/scrollable.rs
+++ b/widget/src/scrollable.rs
@@ -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,
}
}
}
diff --git a/widget/src/text_input/cursor.rs b/widget/src/text_input/cursor.rs
index ea902485..f682b17d 100644
--- a/widget/src/text_input/cursor.rs
+++ b/widget/src/text_input/cursor.rs
@@ -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),
}
}