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()