diff options
author | Andrew Gallant <jamslam@gmail.com> | 2022-03-21 08:31:49 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2022-03-21 08:59:05 -0400 |
commit | 5370064f00856b781c468aabfeaa875408171e03 (patch) | |
tree | fa18e29eab3bc0ca7754c246c625148d91729eef /crates/ignore | |
parent | b6189c659e2cf6ff70c5fd7bbc31a9a8fdb44d94 (diff) |
warnings: remove/tweak some dead code
It looks like the dead code detector got better, so do a little code
cleanup.
Diffstat (limited to 'crates/ignore')
-rw-r--r-- | crates/ignore/src/types.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/crates/ignore/src/types.rs b/crates/ignore/src/types.rs index efb9a8d9..616a8d21 100644 --- a/crates/ignore/src/types.rs +++ b/crates/ignore/src/types.rs @@ -122,10 +122,6 @@ enum GlobInner<'a> { Matched { /// The file type definition which provided the glob. def: &'a FileTypeDef, - /// The index of the glob that matched inside the file type definition. - which: usize, - /// Whether the selection was negated or not. - negated: bool, }, } @@ -291,13 +287,9 @@ impl Types { self.set.matches_into(name, &mut *matches); // The highest precedent match is the last one. if let Some(&i) = matches.last() { - let (isel, iglob) = self.glob_to_selection[i]; + let (isel, _) = self.glob_to_selection[i]; let sel = &self.selections[isel]; - let glob = Glob(GlobInner::Matched { - def: sel.inner(), - which: iglob, - negated: sel.is_negated(), - }); + let glob = Glob(GlobInner::Matched { def: sel.inner() }); return if sel.is_negated() { Match::Ignore(glob) } else { |