Просмотр исходного кода

refactor(clippy): clippy::uninlined_format_args

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Christina Sørensen 2 лет назад
Родитель
Сommit
15609c14e0
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/options/parser.rs

+ 3 - 3
src/options/parser.rs

@@ -484,9 +484,9 @@ pub enum ParseError {
 impl fmt::Display for ParseError {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self {
-            Self::NeedsValue { flag, values: None }      => write!(f, "Flag {} needs a value", flag),
-            Self::NeedsValue { flag, values: Some(cs) }  => write!(f, "Flag {} needs a value ({})", flag, Choices(cs)),
-            Self::ForbiddenValue { flag }                => write!(f, "Flag {} cannot take a value", flag),
+            Self::NeedsValue { flag, values: None }      => write!(f, "Flag {flag} needs a value"),
+            Self::NeedsValue { flag, values: Some(cs) }  => write!(f, "Flag {flag} needs a value ({})", Choices(cs)),
+            Self::ForbiddenValue { flag }                => write!(f, "Flag {flag} cannot take a value"),
             Self::UnknownShortArgument { attempt }       => write!(f, "Unknown argument -{}", *attempt as char),
             Self::UnknownArgument { attempt }            => write!(f, "Unknown argument --{}", attempt.to_string_lossy()),
         }