mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
parent
985394a19e
commit
48646e3451
@ -23,7 +23,7 @@ bench = false
|
|||||||
aho-corasick = "0.7.3"
|
aho-corasick = "0.7.3"
|
||||||
bstr = { version = "0.2.0", default-features = false, features = ["std"] }
|
bstr = { version = "0.2.0", default-features = false, features = ["std"] }
|
||||||
fnv = "1.0.6"
|
fnv = "1.0.6"
|
||||||
log = "0.4.5"
|
log = { version = "0.4.5", optional = true }
|
||||||
regex = { version = "1.1.5", default-features = false, features = ["perf", "std"] }
|
regex = { version = "1.1.5", default-features = false, features = ["perf", "std"] }
|
||||||
serde = { version = "1.0.104", optional = true }
|
serde = { version = "1.0.104", optional = true }
|
||||||
|
|
||||||
@ -33,5 +33,6 @@ lazy_static = "1"
|
|||||||
serde_json = "1.0.45"
|
serde_json = "1.0.45"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
default = ["log"]
|
||||||
simd-accel = []
|
simd-accel = []
|
||||||
serde1 = ["serde"]
|
serde1 = ["serde"]
|
||||||
|
@ -125,6 +125,16 @@ mod pathutil;
|
|||||||
#[cfg(feature = "serde1")]
|
#[cfg(feature = "serde1")]
|
||||||
mod serde_impl;
|
mod serde_impl;
|
||||||
|
|
||||||
|
#[cfg(feature = "log")]
|
||||||
|
macro_rules! debug {
|
||||||
|
($($token:tt)*) => (::log::debug!($($token)*);)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "log"))]
|
||||||
|
macro_rules! debug {
|
||||||
|
($($token:tt)*) => {};
|
||||||
|
}
|
||||||
|
|
||||||
/// Represents an error that can occur when parsing a glob pattern.
|
/// Represents an error that can occur when parsing a glob pattern.
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
pub struct Error {
|
pub struct Error {
|
||||||
@ -413,12 +423,12 @@ impl GlobSet {
|
|||||||
required_exts.add(i, ext, p.regex().to_owned());
|
required_exts.add(i, ext, p.regex().to_owned());
|
||||||
}
|
}
|
||||||
MatchStrategy::Regex => {
|
MatchStrategy::Regex => {
|
||||||
log::debug!("glob converted to regex: {:?}", p);
|
debug!("glob converted to regex: {:?}", p);
|
||||||
regexes.add(i, p.regex().to_owned());
|
regexes.add(i, p.regex().to_owned());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log::debug!(
|
debug!(
|
||||||
"built glob set; {} literals, {} basenames, {} extensions, \
|
"built glob set; {} literals, {} basenames, {} extensions, \
|
||||||
{} prefixes, {} suffixes, {} required extensions, {} regexes",
|
{} prefixes, {} suffixes, {} required extensions, {} regexes",
|
||||||
lits.0.len(),
|
lits.0.len(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user