fix typos

This commit is contained in:
Andreas Fackler 2016-05-12 18:52:51 +03:00 committed by Andreas Fackler
parent fe6ad91767
commit 87df6ae8cb
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ use utils::span_lint;
/// **What it does:** Check for functions with too many parameters.
///
/// **Why is this bad?** Functions with lots of parameters are considered bad style and reduce
/// readability (“what does the 5th parameter means?”). Consider grouping some parameters into a
/// readability (“what does the 5th parameter mean?”). Consider grouping some parameters into a
/// new type.
///
/// **Known problems:** None.
@ -70,7 +70,7 @@ impl Functions {
span_lint(cx,
TOO_MANY_ARGUMENTS,
span,
&format!("this function has to many arguments ({}/{})", args, self.threshold));
&format!("this function has too many arguments ({}/{})", args, self.threshold));
}
}
}

View File

@ -7,13 +7,13 @@
fn good(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool) {}
fn bad(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ()) {
//~^ ERROR: this function has to many arguments (8/7)
//~^ ERROR: this function has too many arguments (8/7)
}
trait Foo {
fn good(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool);
fn bad(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ());
//~^ ERROR: this function has to many arguments (8/7)
//~^ ERROR: this function has too many arguments (8/7)
}
struct Bar;
@ -21,7 +21,7 @@ struct Bar;
impl Bar {
fn good_method(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool) {}
fn bad_method(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ()) {}
//~^ ERROR: this function has to many arguments (8/7)
//~^ ERROR: this function has too many arguments (8/7)
}
// ok, we dont want to warn implementations