Improve magic value message wording (#1892)

The message previously specified 'number', but the error applies to more types.
This commit is contained in:
Tom Fryers
2023-01-15 17:53:02 +00:00
committed by GitHub
parent c7d0d26981
commit 85bdb45eca
2 changed files with 2 additions and 2 deletions

View File

@@ -1277,7 +1277,7 @@ impl Violation for MagicValueComparison {
fn message(&self) -> String {
let MagicValueComparison(value) = self;
format!(
"Magic number used in comparison, consider replacing {value} with a constant variable"
"Magic value used in comparison, consider replacing {value} with a constant variable"
)
}