voxygen: avoid unnecessary allocation

Cow::to_string() goes through &str even for an Owned variant,
Cow::into_owned() passes Owned variants through as-is. As it happens,
the values here are always Owned (see comment in try_msg_ctx()
implementation).
This commit is contained in:
Xiretza 2023-08-29 17:07:04 +00:00
parent 804e24adef
commit 9ef2875db7

View File

@ -228,7 +228,7 @@ pub fn localize_chat_message(
})
},
}
.to_string()
.into_owned()
},
};