Update lint suspicious_to_owned
`matches!(data, String)` will matches any type, replace it with explicit type annotation.
This commit is contained in:
parent
704e00cb75
commit
f86c35c326
@ -2096,8 +2096,7 @@ declare_clippy_lint! {
|
||||
/// let s = "Hello world!";
|
||||
/// let cow = Cow::Borrowed(s);
|
||||
///
|
||||
/// let data = cow.into_owned();
|
||||
/// assert!(matches!(data, String))
|
||||
/// let _data: String = cow.into_owned();
|
||||
/// ```
|
||||
#[clippy::version = "1.65.0"]
|
||||
pub SUSPICIOUS_TO_OWNED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user