We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a5a7cb commit a622885Copy full SHA for a622885
2 files changed
src/error.rs
@@ -52,11 +52,7 @@ impl Error {
52
/// Was the error due to ambiguity of the
53
/// indices or lengths?
54
pub fn is_ambigous(&self) -> bool {
55
- if let Self::Ambiguous = self {
56
- true
57
- } else {
58
- false
59
- }
+ matches!(self, Self::Ambiguous)
60
}
61
62
src/types.rs
@@ -721,10 +721,7 @@ impl VariableType {
721
#[allow(missing_docs)]
722
impl VariableType {
723
pub fn is_string(&self) -> bool {
724
- match self {
725
- Self::String => true,
726
- _ => false,
727
+ matches!(self, Self::String)
728
729
pub fn is_i8(&self) -> bool {
730
self.as_basic().map_or(false, BasicType::is_i8)
0 commit comments