diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-10-30 11:33:03 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-10-30 11:33:03 +0100 |
| commit | aee4e6229b6a796691ba7a5bfff4e2b76700662a (patch) | |
| tree | 3e4b76e2d07936c2e39f227edd92a8a986b814e8 /server/locale/src | |
| parent | a85f6200517405918941cc64ba4b734e246bc411 (diff) | |
| download | hurrycurry-aee4e6229b6a796691ba7a5bfff4e2b76700662a.tar hurrycurry-aee4e6229b6a796691ba7a5bfff4e2b76700662a.tar.bz2 hurrycurry-aee4e6229b6a796691ba7a5bfff4e2b76700662a.tar.zst | |
clippy
Diffstat (limited to 'server/locale/src')
| -rw-r--r-- | server/locale/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/server/locale/src/lib.rs b/server/locale/src/lib.rs index 0bf4bf80..af1c19fc 100644 --- a/server/locale/src/lib.rs +++ b/server/locale/src/lib.rs @@ -46,9 +46,7 @@ impl Locale { // } pub fn merge(&mut self, other: Self) { for (k, v) in other.0 { - if !self.0.contains_key(&k) { - self.0.insert(k, v); - } + self.0.entry(k).or_insert(v); } } pub fn load(path: &Path) -> Result<Self> { |