Update lint suspicious_to_owned

`matches!(data, String)` will matches any type, replace it with explicit type annotation.
This commit is contained in:
bebecue 2022-11-05 04:44:02 +08:00 committed by GitHub
parent 704e00cb75
commit f86c35c326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,