Fix clippy::match-wildcard-for-single-variants
This commit is contained in:
parent
42ed90bc6f
commit
caed50b277
7 changed files with 41 additions and 11 deletions
|
|
@ -1,2 +1,32 @@
|
|||
[alias]
|
||||
lint = "clippy --workspace --no-deps -- -D warnings -D clippy::semicolon_if_nothing_returned -D clippy::trivially-copy-pass-by-ref -D clippy::default_trait_access"
|
||||
lint = """
|
||||
clippy --workspace --no-deps -- \
|
||||
-D warnings \
|
||||
-D clippy::semicolon_if_nothing_returned \
|
||||
-D clippy::trivially-copy-pass-by-ref \
|
||||
-D clippy::default_trait_access \
|
||||
-D clippy::match-wildcard-for-single-variants
|
||||
"""
|
||||
|
||||
nitpick = """
|
||||
clippy --workspace --no-deps -- \
|
||||
-D warnings \
|
||||
-D clippy::pedantic \
|
||||
-A clippy::must_use_candidate \
|
||||
-A clippy::return_self_not_must_use \
|
||||
-A clippy::needless_pass_by_value \
|
||||
-A clippy::cast_precision_loss \
|
||||
-A clippy::cast_sign_loss \
|
||||
-A clippy::cast_possible_truncation \
|
||||
-A clippy::match_same_arms \
|
||||
-A clippy::missing-errors-doc \
|
||||
-A clippy::missing-panics-doc \
|
||||
-A clippy::cast_lossless \
|
||||
-A clippy::doc_markdown \
|
||||
-A clippy::items_after_statements \
|
||||
-A clippy::too_many_lines \
|
||||
-A clippy::module_name_repetitions \
|
||||
-A clippy::if_not_else \
|
||||
-A clippy::redundant_else \
|
||||
-A clippy::used_underscore_binding
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ impl Download {
|
|||
| State::Errored { .. } => {
|
||||
self.state = State::Downloading { progress: 0.0 };
|
||||
}
|
||||
_ => {}
|
||||
State::Downloading{ .. } => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ mod grid {
|
|||
* (1.0 / self.scaling),
|
||||
))
|
||||
}
|
||||
_ => None,
|
||||
Interaction::None => None,
|
||||
};
|
||||
|
||||
let event_status = match interaction {
|
||||
|
|
@ -676,7 +676,7 @@ mod grid {
|
|||
Interaction::None if cursor.is_over(bounds) => {
|
||||
mouse::Interaction::Crosshair
|
||||
}
|
||||
_ => mouse::Interaction::default(),
|
||||
Interaction::None => mouse::Interaction::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ impl<T> crate::graphics::geometry::Renderer for Renderer<T> {
|
|||
crate::Geometry::TinySkia(primitive) => {
|
||||
renderer.draw_primitive(primitive);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
crate::Geometry::Wgpu(_) => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@ impl<T> crate::graphics::geometry::Renderer for Renderer<T> {
|
|||
crate::Geometry::Wgpu(primitive) => {
|
||||
renderer.draw_primitive(primitive);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
crate::Geometry::TinySkia(_) => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ impl Atlas {
|
|||
}));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
Layer::Full => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue