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 @@ fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &'tcx Ty<'tcx>) {
cx, cx,
REF_OPTION_REF, REF_OPTION_REF,
ty.span, 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", "try",
format!("Option<{}>", &snippet(cx, inner_ty.span, "..")), format!("Option<{}>", &snippet(cx, inner_ty.span, "..")),
Applicability::MaybeIncorrect, Applicability::MaybeIncorrect,