Update clippy_lints/src/ref_option_ref.rs

Co-authored-by: Philipp Krones <hello@philkrones.com>
This commit is contained in:
dvermd 2020-10-29 17:39:19 +01:00 committed by GitHub
parent 6212950ceb
commit 230d9cbe36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ impl<'tcx> LateLintPass<'tcx> for RefOptionRef {
cx,
REF_OPTION_REF,
ty.span,
"since & implements Copy trait, &Option<&T> can be simplifyied into Option<&T>",
"since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`",
"try",
format!("Option<{}>", &snippet(cx, inner_ty.span, "..")),
Applicability::MaybeIncorrect,