We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38295a0 commit 10e02cfCopy full SHA for 10e02cf
clippy_lints/src/functions/mod.rs
@@ -432,8 +432,10 @@ declare_clippy_lint! {
432
/// ```
433
/// Use instead:
434
/// ```no_run
435
- /// // caller should use foo(opt.as_ref())
436
- /// fn foo(a: Option<&String>) {}
+ /// // caller should use `foo1(opt.as_ref())`
+ /// fn foo1(a: Option<&String>) {}
437
+ /// // better yet, use string slice `foo2(opt.as_deref())`
438
+ /// fn foo2(a: Option<&str>) {}
439
/// # struct Unit {}
440
/// # impl Unit {
441
/// fn bar(&self) -> Option<&String> { None }
0 commit comments