mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-10-04 06:49:07 +00:00
Update dependencies
This commit is contained in:
parent
f6b8cadeba
commit
ae77e19456
877
Cargo.lock
generated
877
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
64
Cargo.toml
64
Cargo.toml
|
@ -32,41 +32,41 @@ lto = "thin"
|
|||
panic = "abort"
|
||||
|
||||
[build-dependencies]
|
||||
tera = "1.15"
|
||||
ignore = "0.4"
|
||||
serde_json = "1"
|
||||
json5 = "0.4"
|
||||
tera = "1.19.0"
|
||||
ignore = "0.4.20"
|
||||
serde_json = "1.0.104"
|
||||
json5 = "0.4.1"
|
||||
|
||||
[dependencies]
|
||||
aho-corasick = "0.7"
|
||||
arbitrary = { version = "1", features = ["derive"] }
|
||||
aho-corasick = "1.0.2"
|
||||
arbitrary = { version = "1.3.0", features = ["derive"] }
|
||||
clap = { version = "3", features = ["cargo", "wrap_help"] }
|
||||
colored = "2"
|
||||
crossbeam-channel = "0.5"
|
||||
encoding_rs_io = "0.1"
|
||||
grep-searcher = "0.1"
|
||||
ignore = "0.4"
|
||||
log = "0.4"
|
||||
rayon = "1.5.0"
|
||||
serde = { version = "1.0.128", features = ["derive", "rc"] }
|
||||
term_size = "0.3"
|
||||
toml = "0.5"
|
||||
parking_lot = "0.12"
|
||||
dashmap = { version = "5.0.0", features = ["serde"] }
|
||||
num-format = "0.4.0"
|
||||
once_cell = "1.9"
|
||||
regex = "1.5"
|
||||
serde_json = "1"
|
||||
etcetera = "0.8"
|
||||
table_formatter = "0.5.0"
|
||||
colored = "2.0.4"
|
||||
crossbeam-channel = "0.5.8"
|
||||
encoding_rs_io = "0.1.7"
|
||||
grep-searcher = "0.1.11"
|
||||
ignore = "0.4.20"
|
||||
log = "0.4.19"
|
||||
rayon = "1.7.0"
|
||||
serde = { version = "1.0.180", features = ["derive", "rc"] }
|
||||
term_size = "0.3.2"
|
||||
toml = "0.7.6"
|
||||
parking_lot = "0.12.1"
|
||||
dashmap = { version = "5.5.0", features = ["serde"] }
|
||||
num-format = "0.4.4"
|
||||
once_cell = "1.18.0"
|
||||
regex = "1.9.1"
|
||||
serde_json = "1.0.104"
|
||||
etcetera = "0.8.0"
|
||||
table_formatter = "0.6.1"
|
||||
|
||||
[dependencies.env_logger]
|
||||
features = []
|
||||
version = "0.9"
|
||||
version = "0.10.0"
|
||||
|
||||
[dependencies.hex]
|
||||
optional = true
|
||||
version = "0.4"
|
||||
version = "0.4.3"
|
||||
|
||||
[dependencies.serde_cbor]
|
||||
optional = true
|
||||
|
@ -74,11 +74,11 @@ version = "0.11.2"
|
|||
|
||||
[dependencies.serde_yaml]
|
||||
optional = true
|
||||
version = "0.9"
|
||||
version = "0.9.25"
|
||||
|
||||
[dev-dependencies]
|
||||
proptest = "1"
|
||||
strum = "0.24"
|
||||
strum_macros = "0.24"
|
||||
tempfile = "3.2"
|
||||
git2 = { version = "0.15", default-features = false, features = [] }
|
||||
proptest = "1.2.0"
|
||||
strum = "0.25.0"
|
||||
strum_macros = "0.25.1"
|
||||
tempfile = "3.7.0"
|
||||
git2 = { version = "0.17.2", default-features = false, features = [] }
|
||||
|
|
|
@ -326,14 +326,14 @@ impl Cli {
|
|||
padding = Padding::NONE,
|
||||
width = Some(lang_w)
|
||||
)
|
||||
.with_formatter(vec![Colorize::bold]),
|
||||
.with_formatter(vec![table_formatter::table::FormatterFunc::Normal(Colorize::bold)]),
|
||||
cell!(
|
||||
"Extensions",
|
||||
align = Align::Left,
|
||||
padding = Padding::new(3, 0),
|
||||
width = Some(suffix_w)
|
||||
)
|
||||
.with_formatter(vec![Colorize::bold]),
|
||||
.with_formatter(vec![table_formatter::table::FormatterFunc::Normal(Colorize::bold)]),
|
||||
];
|
||||
let content = LanguageType::list()
|
||||
.iter()
|
||||
|
|
|
@ -76,7 +76,7 @@ impl LanguageType {
|
|||
if let Some(end) = syntax
|
||||
.shared
|
||||
.important_syntax
|
||||
.earliest_find(text)
|
||||
.find(text)
|
||||
.and_then(|m| {
|
||||
// Get the position of the last line before the important
|
||||
// syntax.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use aho_corasick::{AhoCorasick, AhoCorasickBuilder};
|
||||
use aho_corasick::AhoCorasick;
|
||||
use dashmap::DashMap;
|
||||
use grep_searcher::LineStep;
|
||||
use log::Level::Trace;
|
||||
|
@ -65,7 +65,7 @@ pub(crate) struct SharedMatchers {
|
|||
pub language: LanguageType,
|
||||
pub allows_nested: bool,
|
||||
pub doc_quotes: &'static [(&'static str, &'static str)],
|
||||
pub important_syntax: AhoCorasick<u16>,
|
||||
pub important_syntax: AhoCorasick,
|
||||
#[allow(dead_code)]
|
||||
pub any_comments: &'static [&'static str],
|
||||
pub is_fortran: bool,
|
||||
|
@ -90,10 +90,14 @@ impl SharedMatchers {
|
|||
}
|
||||
|
||||
pub fn init(language: LanguageType) -> Self {
|
||||
fn init_corasick(pattern: &[&'static str], anchored: bool) -> AhoCorasick<u16> {
|
||||
let mut builder = AhoCorasickBuilder::new();
|
||||
builder.anchored(anchored).dfa(true).prefilter(true);
|
||||
builder.build_with_size(pattern).unwrap()
|
||||
fn init_corasick(pattern: &[&'static str]) -> AhoCorasick {
|
||||
AhoCorasick::builder()
|
||||
.match_kind(aho_corasick::MatchKind::LeftmostLongest)
|
||||
.start_kind(aho_corasick::StartKind::Unanchored)
|
||||
.prefilter(true)
|
||||
.kind(Some(aho_corasick::AhoCorasickKind::DFA))
|
||||
.build(pattern)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
Self {
|
||||
|
@ -102,7 +106,7 @@ impl SharedMatchers {
|
|||
doc_quotes: language.doc_quotes(),
|
||||
is_fortran: language.is_fortran(),
|
||||
is_literate: language.is_literate(),
|
||||
important_syntax: init_corasick(language.important_syntax(), false),
|
||||
important_syntax: init_corasick(language.important_syntax()),
|
||||
any_comments: language.any_comments(),
|
||||
line_comments: language.line_comments(),
|
||||
multi_line_comments: language.multi_line_comments(),
|
||||
|
|
Loading…
Reference in a new issue