Skip to content

Commit

Permalink
Merge pull request #855 from epage/deps
Browse files Browse the repository at this point in the history
chore: Clean up dependencies
  • Loading branch information
epage authored Oct 16, 2023
2 parents c004e98 + b221e9c commit bb22d73
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 300 deletions.
388 changes: 121 additions & 267 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/codespell-dict/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dictgen = { version = "^0.2", path = "../dictgen" }
[dev-dependencies]
unicase = "2.7"
itertools = "0.11"
codegenrs = "2.0"
codegenrs = "3.0"
dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] }
snapbox = { version = "0.4.13", features = ["path"] }
snapbox = { version = "0.4.14", features = ["path"] }
typos = { path = "../typos" }
4 changes: 2 additions & 2 deletions crates/misspell-dict/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dictgen = { version = "^0.2", path = "../dictgen" }
[dev-dependencies]
unicase = "2.7"
itertools = "0.11"
codegenrs = "2.0"
codegenrs = "3.0"
regex = "1"
dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] }
snapbox = { version = "0.4.13", features = ["path"] }
snapbox = { version = "0.4.14", features = ["path"] }
12 changes: 5 additions & 7 deletions crates/typos-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ clap = { version = "4.4.6", features = ["derive"] }
clap-verbosity-flag = "2.0"
ignore = "0.4"
serde = { version = "1.0", features = ["derive"] }
toml = "0.8.1"
toml = "0.8.2"
log = "0.4"
env_logger = { version = "0.10", default-features = false, features = ["auto-color"] }
atty = "0.2.14"
bstr = "1.6"
once_cell = "1.18.0"
bstr = "1.7"
ahash = "0.8"
difflib = "0.4"
proc-exit = "2.0"
Expand All @@ -76,14 +74,14 @@ anstyle = "1.0.4"
anstream = "0.6.4"
colorchoice-clap = "1.0.3"
serde_regex = "1.1.0"
regex = "1.9.6"
regex = "1.10.2"
encoding_rs = "0.8.33"

[dev-dependencies]
assert_fs = "1.0"
trycmd = "0.14.18"
trycmd = "0.14.19"
criterion = "0.5"
snapbox = "0.4.13"
snapbox = "0.4.14"

[[bench]]
name = "checks"
Expand Down
3 changes: 1 addition & 2 deletions crates/typos-cli/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ impl<'t, 'd, 'i> Policy<'t, 'd, 'i> {
}
}

static DEFAULT_TOKENIZER: once_cell::sync::Lazy<typos::tokens::Tokenizer> =
once_cell::sync::Lazy::new(typos::tokens::Tokenizer::new);
static DEFAULT_TOKENIZER: typos::tokens::Tokenizer = typos::tokens::Tokenizer::new();
static DEFAULT_DICT: crate::dict::BuiltIn = crate::dict::BuiltIn::new(crate::config::Locale::En);
static DEFAULT_IGNORE: &[regex::Regex] = &[];

Expand Down
6 changes: 3 additions & 3 deletions crates/typos-dict/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ unicase = "2.7"
dictgen = { version = "^0.2", path = "../dictgen" }

[dev-dependencies]
csv = "1.2"
csv = "1.3"
itertools = "0.11"
edit-distance = "2.1"
unicase = "2.7"
codegenrs = "2.0"
codegenrs = "3.0"
dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] }
varcon = { version = "^0.7", path = "../varcon" }
snapbox = { version = "0.4.13", features = ["path"] }
snapbox = { version = "0.4.14", features = ["path"] }
indexmap = "2.0.2"
4 changes: 2 additions & 2 deletions crates/typos-vars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ varcon = { version = "^0.7", path = "../varcon", features = ["flags"] }
varcon-core = { version = "^4.0", path = "../varcon-core", features = ["flags"] }
typos = { version = "^0.10", path = "../typos" }
unicase = "2.7"
codegenrs = "2.0"
codegenrs = "3.0"
itertools = "0.11"
dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] }
snapbox = { version = "0.4.13", features = ["path"] }
snapbox = { version = "0.4.14", features = ["path"] }
4 changes: 2 additions & 2 deletions crates/typos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ include.workspace = true
[dependencies]
anyhow = "1.0"
thiserror = "1.0"
winnow = "0.5.15"
winnow = "0.5.17"
unicode-xid = "0.2.4"
once_cell = "1.18.0"
serde = { version = "1.0", features = ["derive"] }
simdutf8 = "0.1.4"
itertools = "0.11"
unicode-segmentation = "1.10.1"
bstr = "1.6"
bstr = "1.7"
17 changes: 9 additions & 8 deletions crates/typos/src/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub struct TokenizerBuilder {

impl TokenizerBuilder {
#[inline]
pub fn new() -> Self {
Default::default()
pub const fn new() -> Self {
Self { unicode: true }
}

/// Specify that unicode Identifiers are allowed.
Expand All @@ -21,15 +21,16 @@ impl TokenizerBuilder {
}

#[inline]
pub fn build(&self) -> Tokenizer {
let TokenizerBuilder { unicode } = self.clone();
Tokenizer { unicode }
pub const fn build(&self) -> Tokenizer {
Tokenizer {
unicode: self.unicode,
}
}
}

impl Default for TokenizerBuilder {
fn default() -> Self {
Self { unicode: true }
Self::new()
}
}

Expand All @@ -41,8 +42,8 @@ pub struct Tokenizer {

impl Tokenizer {
#[inline]
pub fn new() -> Self {
TokenizerBuilder::default().build()
pub const fn new() -> Self {
TokenizerBuilder::new().build()
}

pub fn parse_str<'c>(&'c self, content: &'c str) -> impl Iterator<Item = Identifier<'c>> {
Expand Down
2 changes: 1 addition & 1 deletion crates/varcon-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parser = ["dep:winnow"]
flags = ["dep:enumflags2"]

[dependencies]
winnow = { version = "0.5.15", optional = true }
winnow = { version = "0.5.17", optional = true }
enumflags2 = { version = "0.7", optional = true }

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions crates/varcon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ flags = ["varcon-core/flags"]
varcon-core = { version = "^4.0", path = "../varcon-core" }

[dev-dependencies]
codegenrs = "2.0"
codegenrs = "3.0"
varcon-core = { version = "^4.0", path = "../varcon-core", features = ["parser"] }
snapbox = { version = "0.4.13", features = ["path"] }
snapbox = { version = "0.4.14", features = ["path"] }
4 changes: 2 additions & 2 deletions crates/wikipedia-dict/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ dictgen = { version = "^0.2", path = "../dictgen" }
[dev-dependencies]
unicase = "2.7"
itertools = "0.11"
codegenrs = "2.0"
codegenrs = "3.0"
dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] }
snapbox = { version = "0.4.13", features = ["path"] }
snapbox = { version = "0.4.14", features = ["path"] }

0 comments on commit bb22d73

Please sign in to comment.