Fix even more clippy warnings
This commit is contained in:
parent
bfecb18771
commit
57c6ed0c07
53 changed files with 276 additions and 520 deletions
|
@ -136,10 +136,7 @@ impl Emitter for JsonEmitter {
|
|||
}
|
||||
|
||||
fn should_show_explain(&self) -> bool {
|
||||
match self.json_rendered {
|
||||
HumanReadableErrorType::Short(_) => false,
|
||||
_ => true,
|
||||
}
|
||||
!matches!(self.json_rendered, HumanReadableErrorType::Short(_))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -91,10 +91,7 @@ pub enum SuggestionStyle {
|
|||
|
||||
impl SuggestionStyle {
|
||||
fn hide_inline(&self) -> bool {
|
||||
match *self {
|
||||
SuggestionStyle::ShowCode => false,
|
||||
_ => true,
|
||||
}
|
||||
!matches!(*self, SuggestionStyle::ShowCode)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1038,10 +1035,7 @@ impl Level {
|
|||
}
|
||||
|
||||
pub fn is_failure_note(&self) -> bool {
|
||||
match *self {
|
||||
FailureNote => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(*self, FailureNote)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,10 +158,7 @@ impl Annotation {
|
|||
|
||||
pub fn takes_space(&self) -> bool {
|
||||
// Multiline annotations always have to keep vertical space.
|
||||
match self.annotation_type {
|
||||
AnnotationType::MultilineStart(_) | AnnotationType::MultilineEnd(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self.annotation_type, AnnotationType::MultilineStart(_) | AnnotationType::MultilineEnd(_))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue