From cbde8201c5f5d56c3bea9aa328a61f71a805138f Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 5 Oct 2018 13:26:39 -0700 Subject: [PATCH] Remove unused utils --- clippy_lints/src/utils/mod.rs | 8 -------- clippy_lints/src/utils/paths.rs | 1 - 2 files changed, 9 deletions(-) diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index fa3c72dbb7d..6c963cf205b 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -957,14 +957,6 @@ pub fn get_arg_name(pat: &Pat) -> Option { } } -pub fn get_arg_ident(pat: &Pat) -> Option { - match pat.node { - PatKind::Binding(_, _, ident, None) => Some(ident), - PatKind::Ref(ref subpat, _) => get_arg_ident(subpat), - _ => None, - } -} - pub fn int_bits(tcx: TyCtxt<'_, '_, '_>, ity: ast::IntTy) -> u64 { layout::Integer::from_attr(tcx, attr::IntType::SignedInt(ity)).size().bits() } diff --git a/clippy_lints/src/utils/paths.rs b/clippy_lints/src/utils/paths.rs index eb28cc7e179..f2f1a4db375 100644 --- a/clippy_lints/src/utils/paths.rs +++ b/clippy_lints/src/utils/paths.rs @@ -12,7 +12,6 @@ pub const BORROW_TRAIT: [&str; 3] = ["core", "borrow", "Borrow"]; pub const BTREEMAP: [&str; 5] = ["alloc", "collections", "btree", "map", "BTreeMap"]; pub const BTREEMAP_ENTRY: [&str; 5] = ["alloc", "collections", "btree", "map", "Entry"]; pub const BTREESET: [&str; 5] = ["alloc", "collections", "btree", "set", "BTreeSet"]; -pub const CLONE: [&str; 4] = ["core", "clone", "Clone", "clone"]; pub const CLONE_TRAIT: [&str; 3] = ["core", "clone", "Clone"]; pub const CMP_MAX: [&str; 3] = ["core", "cmp", "max"]; pub const CMP_MIN: [&str; 3] = ["core", "cmp", "min"];