File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ declare_clippy_lint! {
18
18
///
19
19
/// **Example:**
20
20
/// ```rust
21
+ /// # let option = Some(0);
22
+ /// # fn do_something_with(_x: usize) {}
21
23
/// if option.is_some() {
22
24
/// do_something_with(option.unwrap())
23
25
/// }
@@ -26,6 +28,8 @@ declare_clippy_lint! {
26
28
/// Could be written:
27
29
///
28
30
/// ```rust
31
+ /// # let option = Some(0);
32
+ /// # fn do_something_with(_x: usize) {}
29
33
/// if let Some(value) = option {
30
34
/// do_something_with(value)
31
35
/// }
@@ -45,6 +49,8 @@ declare_clippy_lint! {
45
49
///
46
50
/// **Example:**
47
51
/// ```rust
52
+ /// # let option = Some(0);
53
+ /// # fn do_something_with(_x: usize) {}
48
54
/// if option.is_none() {
49
55
/// do_something_with(option.unwrap())
50
56
/// }
You can’t perform that action at this time.
0 commit comments