chore: remove unnecessary parentheses around type

This commit is contained in:
Lzu Tao 2019-11-05 21:51:56 +07:00
parent a37bd8c376
commit 98313bd83a
2 changed files with 2 additions and 2 deletions

View file

@ -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"),

View file

@ -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<def::Res> {
let crates = cx.tcx.crates();
let krate = crates
.iter()