diff options
| author | Fuwn <[email protected]> | 2024-06-03 15:37:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-03 15:37:20 -0700 |
| commit | 714d9b3cf1851ffe02424f0742126d3e82c76ccb (patch) | |
| tree | c9ab6b0f57ec91e351bcc5cadf33de925b136048 /crates/whirl_common/src | |
| parent | format: rustfmt with new rules (diff) | |
| download | whirl-714d9b3cf1851ffe02424f0742126d3e82c76ccb.tar.xz whirl-714d9b3cf1851ffe02424f0742126d3e82c76ccb.zip | |
refactor(crates): update idioms
Diffstat (limited to 'crates/whirl_common/src')
| -rw-r--r-- | crates/whirl_common/src/log.rs | 2 | ||||
| -rw-r--r-- | crates/whirl_common/src/sort.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/whirl_common/src/log.rs b/crates/whirl_common/src/log.rs index 38248cf..98aba50 100644 --- a/crates/whirl_common/src/log.rs +++ b/crates/whirl_common/src/log.rs @@ -15,7 +15,7 @@ pub fn calculate_log_level() -> String { _ => "info".to_string(), }; if !Config::get().whirlsplash.log.everything { - level = format!("whirl={}", level); + level = format!("whirl={level}"); } level diff --git a/crates/whirl_common/src/sort.rs b/crates/whirl_common/src/sort.rs index 9c7e092..c8b9cae 100644 --- a/crates/whirl_common/src/sort.rs +++ b/crates/whirl_common/src/sort.rs @@ -3,6 +3,6 @@ /// Sort a vector by alphabetical order based on the first character of each /// string. -pub fn vec_alphabetically(vec: &mut Vec<&str>) { - vec.sort_by(|a, b| a.to_lowercase().cmp(&b.to_lowercase())); +pub fn vec_alphabetically(vec: &mut [&str]) { + vec.sort_by_key(|a| a.to_lowercase()); } |