summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/fn_params_excessive_bools.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/fn_params_excessive_bools.txt')
-rw-r--r--src/tools/clippy/src/docs/fn_params_excessive_bools.txt31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/tools/clippy/src/docs/fn_params_excessive_bools.txt b/src/tools/clippy/src/docs/fn_params_excessive_bools.txt
deleted file mode 100644
index 2eae05633..000000000
--- a/src/tools/clippy/src/docs/fn_params_excessive_bools.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-### What it does
-Checks for excessive use of
-bools in function definitions.
-
-### Why is this bad?
-Calls to such functions
-are confusing and error prone, because it's
-hard to remember argument order and you have
-no type system support to back you up. Using
-two-variant enums instead of bools often makes
-API easier to use.
-
-### Example
-```
-fn f(is_round: bool, is_hot: bool) { ... }
-```
-
-Use instead:
-```
-enum Shape {
- Round,
- Spiky,
-}
-
-enum Temperature {
- Hot,
- IceCold,
-}
-
-fn f(shape: Shape, temperature: Temperature) { ... }
-``` \ No newline at end of file