Skip to content

Commit f710528

Browse files
committed
fix doctest
1 parent ace0b85 commit f710528

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_lints/src/infallible_try_from.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ declare_clippy_lint! {
1616
///
1717
/// ### Example
1818
/// ```no_run
19+
/// use std::convert::Infallible;
20+
/// struct MyStruct(i16);
1921
/// impl TryFrom<i16> for MyStruct {
2022
/// type Error = Infallible;
2123
/// fn try_from(other: i16) -> Result<Self, Infallible> {
@@ -25,6 +27,7 @@ declare_clippy_lint! {
2527
/// ```
2628
/// Use instead:
2729
/// ```no_run
30+
/// struct MyStruct(i16);
2831
/// impl From<i16> for MyStruct {
2932
/// fn from(other: i16) -> Self {
3033
/// Self(other)

0 commit comments

Comments
 (0)