mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Correctly pluralize message
This commit is contained in:
parent
73327c647d
commit
d04f3604d5
1 changed files with 2 additions and 1 deletions
|
@ -208,7 +208,8 @@ pub struct MismatchedArgCount {
|
|||
|
||||
impl Diagnostic for MismatchedArgCount {
|
||||
fn message(&self) -> String {
|
||||
format!("Expected {} arguments, found {}", self.expected, self.found)
|
||||
let s = if self.expected == 1 { "" } else { "s" };
|
||||
format!("Expected {} argument{}, found {}", self.expected, s, self.found)
|
||||
}
|
||||
fn source(&self) -> InFile<SyntaxNodePtr> {
|
||||
InFile { file_id: self.file, value: self.call_expr.clone().into() }
|
||||
|
|
Loading…
Reference in a new issue