Skip to content

Commit

Permalink
Simplify , removing a FIXME
Browse files Browse the repository at this point in the history
  • Loading branch information
llogiq committed Sep 6, 2019
1 parent c3d4294 commit 72058a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clippy_lints/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,6 @@ mod test {
}

pub fn match_def_path<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, did: DefId, syms: &[&str]) -> bool {
// HACK: find a way to use symbols from clippy or just go fully to diagnostic items
let syms: Vec<_> = syms.iter().map(|sym| Symbol::intern(sym)).collect();
cx.match_def_path(did, &syms)
let path = cx.get_def_path(did);
path.len() == syms.len() && path.into_iter().zip(syms.iter()).all(|(a, &b)| a.as_str() == b)
}

0 comments on commit 72058a6

Please sign in to comment.