]> git.lizzy.rs Git - rust.git/blob - src/docs/too_many_arguments.txt
[Arithmetic] Consider literals
[rust.git] / src / docs / too_many_arguments.txt
1 ### What it does
2 Checks for functions with too many parameters.
3
4 ### Why is this bad?
5 Functions with lots of parameters are considered bad
6 style and reduce readability (“what does the 5th parameter mean?”). Consider
7 grouping some parameters into a new type.
8
9 ### Example
10 ```
11 fn foo(x: u32, y: u32, name: &str, c: Color, w: f32, h: f32, a: f32, b: f32) {
12     // ..
13 }
14 ```