We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ace0b85 commit f710528Copy full SHA for f710528
clippy_lints/src/infallible_try_from.rs
@@ -16,6 +16,8 @@ declare_clippy_lint! {
16
///
17
/// ### Example
18
/// ```no_run
19
+ /// use std::convert::Infallible;
20
+ /// struct MyStruct(i16);
21
/// impl TryFrom<i16> for MyStruct {
22
/// type Error = Infallible;
23
/// fn try_from(other: i16) -> Result<Self, Infallible> {
@@ -25,6 +27,7 @@ declare_clippy_lint! {
25
27
/// ```
26
28
/// Use instead:
29
30
31
/// impl From<i16> for MyStruct {
32
/// fn from(other: i16) -> Self {
33
/// Self(other)
0 commit comments