We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a73b8f commit feca48dCopy full SHA for feca48d
clippy_lints/src/unwrap.rs
@@ -18,6 +18,8 @@ declare_clippy_lint! {
18
///
19
/// **Example:**
20
/// ```rust
21
+ /// # let option = Some(0);
22
+ /// # fn do_something_with(_x: usize) {}
23
/// if option.is_some() {
24
/// do_something_with(option.unwrap())
25
/// }
@@ -26,6 +28,8 @@ declare_clippy_lint! {
26
28
/// Could be written:
27
29
30
31
32
33
/// if let Some(value) = option {
34
/// do_something_with(value)
35
@@ -45,6 +49,8 @@ declare_clippy_lint! {
45
49
46
50
47
51
52
53
48
54
/// if option.is_none() {
55
56
0 commit comments