Skip to content

Commit e890bb5

Browse files
committed
Merge pull request #921 from afck/master
fix typos
2 parents 7d4042b + 87df6ae commit e890bb5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/functions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use utils::span_lint;
88
/// **What it does:** Check for functions with too many parameters.
99
///
1010
/// **Why is this bad?** Functions with lots of parameters are considered bad style and reduce
11-
/// readability (“what does the 5th parameter means?”). Consider grouping some parameters into a
11+
/// readability (“what does the 5th parameter mean?”). Consider grouping some parameters into a
1212
/// new type.
1313
///
1414
/// **Known problems:** None.
@@ -70,7 +70,7 @@ impl Functions {
7070
span_lint(cx,
7171
TOO_MANY_ARGUMENTS,
7272
span,
73-
&format!("this function has to many arguments ({}/{})", args, self.threshold));
73+
&format!("this function has too many arguments ({}/{})", args, self.threshold));
7474
}
7575
}
7676
}

tests/compile-fail/functions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
fn good(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool) {}
88

99
fn bad(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ()) {
10-
//~^ ERROR: this function has to many arguments (8/7)
10+
//~^ ERROR: this function has too many arguments (8/7)
1111
}
1212

1313
trait Foo {
1414
fn good(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool);
1515
fn bad(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ());
16-
//~^ ERROR: this function has to many arguments (8/7)
16+
//~^ ERROR: this function has too many arguments (8/7)
1717
}
1818

1919
struct Bar;
2020

2121
impl Bar {
2222
fn good_method(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool) {}
2323
fn bad_method(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ()) {}
24-
//~^ ERROR: this function has to many arguments (8/7)
24+
//~^ ERROR: this function has too many arguments (8/7)
2525
}
2626

2727
// ok, we don’t want to warn implementations

0 commit comments

Comments
 (0)