Merge pull request #921 from afck/master

fix typos
This commit is contained in:
Martin Carton
2016-05-13 12:13:23 +02:00
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -8,7 +8,7 @@
/// **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 @@ fn check_arg_number(&self, cx: &LateContext, decl: &hir::FnDecl, span: Span) {
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));
}
}
}
+3 -3
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 @@ trait Foo {
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