Simplify the borrow_deref_ref lint example

This commit is contained in:
Stanislav Tkach 2022-08-13 16:04:30 +02:00
parent 4d5d191f6a
commit 7727c303e5
No known key found for this signature in database
GPG key ID: 5C12714F37319B1D

View file

@ -29,20 +29,15 @@ declare_clippy_lint! {
///
/// ### 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,