Skip to content

Commit

Permalink
cow is not applicable there
Browse files Browse the repository at this point in the history
  • Loading branch information
Fogapod committed Nov 15, 2023
1 parent d912590 commit 3fe2874
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion benches/accents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ pub fn read_sample_file_lines() -> Vec<String> {
fn accents(c: &mut Criterion) {
let lines = read_sample_file_lines();

for replacement in ["original", "simple", "any", "weights", "uppercase", "lowercase"] {
for replacement in [
"original",
"simple",
"any",
"weights",
"uppercase",
"lowercase",
] {
let accent = read_accent(&format!("benches/{replacement}.ron"));

c.bench_function(&format!("accents::{replacement}"), |b| {
Expand Down
1 change: 0 additions & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ impl SimpleString {
impl SimpleString {
/// Try to learn something about strings and adjust case accordingly. all logic is currently
/// ascii only
// tried using Cows but my computer exploded. TODO: try that again
pub(crate) fn mimic_ascii_case(&self, original: &str) -> String {
let mut body = self.body.clone();

Expand Down

0 comments on commit 3fe2874

Please sign in to comment.