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 3e52031 commit 307b800Copy full SHA for 307b800
clippy_lints/src/methods/mod.rs
@@ -197,13 +197,22 @@ declare_clippy_lint! {
197
/// result.unwrap();
198
/// ```
199
///
200
- /// Use instead:
+ /// If [expect_used](#expect_used) is allowed, instead:
201
/// ```rust
202
/// # let option = Some(1);
203
/// # let result: Result<usize, ()> = Ok(1);
204
/// option.expect("more helpful message");
205
/// result.expect("more helpful message");
206
207
+ ///
208
+ /// Otherwise try using
209
+ /// ```rust
210
+ /// option?;
211
212
+ /// // or
213
214
+ /// result?;
215
+ /// ```
216
#[clippy::version = "1.45.0"]
217
pub UNWRAP_USED,
218
restriction,
0 commit comments