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! {
1818 ///
1919 /// **Example:**
2020 /// ```rust
21+ /// # let option = Some(0);
22+ /// # fn do_something_with(_x: usize) {}
2123 /// if option.is_some() {
2224 /// do_something_with(option.unwrap())
2325 /// }
@@ -26,6 +28,8 @@ declare_clippy_lint! {
2628 /// Could be written:
2729 ///
2830 /// ```rust
31+ /// # let option = Some(0);
32+ /// # fn do_something_with(_x: usize) {}
2933 /// if let Some(value) = option {
3034 /// do_something_with(value)
3135 /// }
@@ -45,6 +49,8 @@ declare_clippy_lint! {
4549 ///
4650 /// **Example:**
4751 /// ```rust
52+ /// # let option = Some(0);
53+ /// # fn do_something_with(_x: usize) {}
4854 /// if option.is_none() {
4955 /// do_something_with(option.unwrap())
5056 /// }
You can’t perform that action at this time.
0 commit comments