Skip to content

Commit 95a9b97

Browse files
committed
Simplify default mods
1 parent e76ef3b commit 95a9b97

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rustc-hash = "2.1.0"
2222
regex-automata = "0.4.9"
2323

2424
[features]
25-
default = ["python-bindings"]
2625
python-bindings = ["pyo3"]
2726

2827
[lib]

src/vocabulary/processor.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,10 @@ pub(crate) struct Mods {
9393
spacechar: String,
9494
}
9595

96-
impl Default for Mods {
97-
/// Default string modification to be applied by `TokenProcessor` of `ByteFallback` level.
98-
fn default() -> Self {
99-
Self {
100-
spacechar: ' '.to_string(),
101-
}
102-
}
103-
}
104-
10596
impl Mods {
106-
/// Apply default modifications to each token.
97+
/// Default string modification to be applied by `TokenProcessor` of `ByteFallback` level.
10798
fn apply_default(&self, token: &str) -> String {
108-
token.replace(&self.spacechar, &Self::default().spacechar)
99+
token.replace(&self.spacechar, " ")
109100
}
110101
}
111102

0 commit comments

Comments
 (0)