Skip to content

Commit a622885

Browse files
committed
Clippy lint
1 parent 4a5a7cb commit a622885

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

src/error.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ impl Error {
5252
/// Was the error due to ambiguity of the
5353
/// indices or lengths?
5454
pub fn is_ambigous(&self) -> bool {
55-
if let Self::Ambiguous = self {
56-
true
57-
} else {
58-
false
59-
}
55+
matches!(self, Self::Ambiguous)
6056
}
6157
}
6258

src/types.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,7 @@ impl VariableType {
721721
#[allow(missing_docs)]
722722
impl VariableType {
723723
pub fn is_string(&self) -> bool {
724-
match self {
725-
Self::String => true,
726-
_ => false,
727-
}
724+
matches!(self, Self::String)
728725
}
729726
pub fn is_i8(&self) -> bool {
730727
self.as_basic().map_or(false, BasicType::is_i8)

0 commit comments

Comments
 (0)