mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-13 21:26:27 +02:00
ignore: add some 'allow(dead_code)' annotations
I don't usually like doing this and would prefer to just delete unused code, but I don't have the context required to understand why this code is unused. A refresh of this crate is on the (distant) horizon, so I'll just leave these here for now to squash the warnings.
This commit is contained in:
parent
e0a85678e1
commit
67dd809a80
@ -34,11 +34,13 @@ use crate::{
|
|||||||
/// IgnoreMatch represents information about where a match came from when using
|
/// IgnoreMatch represents information about where a match came from when using
|
||||||
/// the `Ignore` matcher.
|
/// the `Ignore` matcher.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) struct IgnoreMatch<'a>(IgnoreMatchInner<'a>);
|
pub(crate) struct IgnoreMatch<'a>(IgnoreMatchInner<'a>);
|
||||||
|
|
||||||
/// IgnoreMatchInner describes precisely where the match information came from.
|
/// IgnoreMatchInner describes precisely where the match information came from.
|
||||||
/// This is private to allow expansion to more matchers in the future.
|
/// This is private to allow expansion to more matchers in the future.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum IgnoreMatchInner<'a> {
|
enum IgnoreMatchInner<'a> {
|
||||||
Override(overrides::Glob<'a>),
|
Override(overrides::Glob<'a>),
|
||||||
Gitignore(&'a gitignore::Glob),
|
Gitignore(&'a gitignore::Glob),
|
||||||
|
@ -23,9 +23,11 @@ use crate::{
|
|||||||
/// The lifetime `'a` refers to the lifetime of the matcher that produced
|
/// The lifetime `'a` refers to the lifetime of the matcher that produced
|
||||||
/// this glob.
|
/// this glob.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct Glob<'a>(GlobInner<'a>);
|
pub struct Glob<'a>(GlobInner<'a>);
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum GlobInner<'a> {
|
enum GlobInner<'a> {
|
||||||
/// No glob matched, but the file path should still be ignored.
|
/// No glob matched, but the file path should still be ignored.
|
||||||
UnmatchedIgnore,
|
UnmatchedIgnore,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user