From 98313bd83aad7de8dc3cc9d18072923c12eb9ce6 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 5 Nov 2019 21:51:56 +0700 Subject: [PATCH] chore: remove unnecessary parentheses around type --- 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 d4194b0ca..a8c953b88 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 5729c8c29..bf46a9a8b 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()