Simplify the borrow_deref_ref lint example
This commit is contained in:
parent
4d5d191f6a
commit
7727c303e5
@ -29,20 +29,15 @@
|
||||
///
|
||||
/// ### Example
|
||||
/// ```rust
|
||||
/// fn foo(_x: &str) {}
|
||||
///
|
||||
/// let s = &String::new();
|
||||
///
|
||||
/// let a: &String = &* s;
|
||||
/// foo(&*s);
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
/// ```rust
|
||||
/// # fn foo(_x: &str) {}
|
||||
/// # let s = &String::new();
|
||||
/// let a: &String = s;
|
||||
/// foo(&**s);
|
||||
/// ```
|
||||
#[clippy::version = "1.63.0"]
|
||||
pub BORROW_DEREF_REF,
|
||||
|
Loading…
Reference in New Issue
Block a user