Add way to completely hide suggestion from cli output
This commit is contained in:
parent
7cfba1c5e8
commit
235523c7d4
4 changed files with 47 additions and 3 deletions
|
@ -72,8 +72,10 @@ pub enum Applicability {
|
|||
pub enum SuggestionStyle {
|
||||
/// Hide the suggested code when displaying this suggestion inline.
|
||||
HideCodeInline,
|
||||
/// Always hide the suggested code.
|
||||
/// Always hide the suggested code but display the message.
|
||||
HideCodeAlways,
|
||||
/// Do not display this suggestion in the cli output, it is only meant for tools.
|
||||
CompletelyHidden,
|
||||
/// Always show the suggested code.
|
||||
/// This will *not* show the code if the suggestion is inline *and* the suggested code is
|
||||
/// empty.
|
||||
|
@ -83,8 +85,8 @@ pub enum SuggestionStyle {
|
|||
impl SuggestionStyle {
|
||||
fn hide_inline(&self) -> bool {
|
||||
match *self {
|
||||
SuggestionStyle::HideCodeAlways | SuggestionStyle::HideCodeInline => true,
|
||||
SuggestionStyle::ShowCode => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue