Skip to content

Commit 1ce5ccd

Browse files
author
navh
committed
Revert "update documentation for cast"
This reverts commit be27fa7.
1 parent be27fa7 commit 1ce5ccd

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

clippy_lints/src/casts/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,12 @@ declare_clippy_lint! {
8080
/// ### What it does
8181
/// Checks for casts between numerical types that may
8282
/// 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.
8584
///
8685
/// ### Why is this bad?
8786
/// In some problem domains, it is good practice to avoid
8887
/// 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.
9089
///
9190
/// ### Example
9291
/// ```rust

src/docs/cast_possible_truncation.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
### What it does
22
Checks for casts between numerical types that may
33
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.
65

76
### Why is this bad?
87
In some problem domains, it is good practice to avoid
98
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.
1110

1211
### Example
1312
```

0 commit comments

Comments
 (0)