Skip to content

Commit

Permalink
Minor perf optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvildave committed Oct 29, 2024
1 parent df7a873 commit aeef2d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "uast"
version = "4.0.4"
version = "4.0.5"
edition = "2021"
rust-version = "1.74.0"
description = "Unicode Aware Saṃskṛta Transliteration in Rust 🦀"
Expand Down
2 changes: 1 addition & 1 deletion src/uast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static UNASPIRATED_CONSONANTS: [char; 10] = ['b', 'c', 'd', 'g', 'j', 'k', 'p',
fn handle_unicode(uast: &str) -> Vec<char> {
let str = uast.to_lowercase().chars().collect::<Vec<char>>();

let mut arr = Vec::<char>::new();
let mut arr = Vec::<char>::with_capacity(str.len());

let mut i = 0;
while i < str.len() {
Expand Down

0 comments on commit aeef2d3

Please sign in to comment.