chore: remove unnecessary parentheses around type
This commit is contained in:
@@ -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 {
|
match ty.kind {
|
||||||
ty::Bool => Some("AtomicBool"),
|
ty::Bool => Some("AtomicBool"),
|
||||||
ty::Uint(_) => Some("AtomicUsize"),
|
ty::Uint(_) => Some("AtomicUsize"),
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ pub fn match_path_ast(path: &ast::Path, segments: &[&str]) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the definition associated to a path.
|
/// 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<def::Res> {
|
||||||
let crates = cx.tcx.crates();
|
let crates = cx.tcx.crates();
|
||||||
let krate = crates
|
let krate = crates
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
Reference in New Issue
Block a user