File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -80,13 +80,12 @@ declare_clippy_lint! {
80
80
/// ### What it does
81
81
/// Checks for casts between numerical types that may
82
82
/// truncate large values. This is expected behavior, so the cast is `Allow` by
83
- /// default. This lint prompts user to either allow the lint if truncation is desired,
84
- /// or suggests using `try_from` and handling the error.
83
+ /// default.
85
84
///
86
85
/// ### Why is this bad?
87
86
/// In some problem domains, it is good practice to avoid
88
87
/// truncation. This lint can be activated to help assess where additional
89
- /// checks could be beneficial.
88
+ /// checks could be beneficial, and suggests implementing TryFrom trait .
90
89
///
91
90
/// ### Example
92
91
/// ```rust
Original file line number Diff line number Diff line change 1
1
### What it does
2
2
Checks for casts between numerical types that may
3
3
truncate large values. This is expected behavior, so the cast is `Allow` by
4
- default. This lint prompts user to either allow the lint if truncation is desired,
5
- or suggests using `try_from` and handling the error.
4
+ default.
6
5
7
6
### Why is this bad?
8
7
In some problem domains, it is good practice to avoid
9
8
truncation. This lint can be activated to help assess where additional
10
- checks could be beneficial.
9
+ checks could be beneficial, and suggests implementing TryFrom trait .
11
10
12
11
### Example
13
12
```
You can’t perform that action at this time.
0 commit comments