From 512124a3687ef13bae8376875bc063e77327b6c0 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Sat, 2 Nov 2019 08:42:33 +0200 Subject: [PATCH] fix 'unnecessary parentheses around type' warnings --- clippy_lints/src/mutex_atomic.rs | 2 +- clippy_lints/src/utils/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/mutex_atomic.rs b/clippy_lints/src/mutex_atomic.rs index d4194b0ca413..a8c953b880b8 100644 --- a/clippy_lints/src/mutex_atomic.rs +++ b/clippy_lints/src/mutex_atomic.rs @@ -77,7 +77,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Mutex { } } -fn get_atomic_name(ty: Ty<'_>) -> Option<(&'static str)> { +fn get_atomic_name(ty: Ty<'_>) -> Option<&'static str> { match ty.kind { ty::Bool => Some("AtomicBool"), ty::Uint(_) => Some("AtomicUsize"), diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 5729c8c2967a..bf46a9a8b822 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -239,7 +239,7 @@ pub fn match_path_ast(path: &ast::Path, segments: &[&str]) -> bool { } /// Gets the definition associated to a path. -pub fn path_to_res(cx: &LateContext<'_, '_>, path: &[&str]) -> Option<(def::Res)> { +pub fn path_to_res(cx: &LateContext<'_, '_>, path: &[&str]) -> Option { let crates = cx.tcx.crates(); let krate = crates .iter()