mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
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:
parent
804e24adef
commit
9ef2875db7
@ -228,7 +228,7 @@ pub fn localize_chat_message(
|
||||
})
|
||||
},
|
||||
}
|
||||
.to_string()
|
||||
.into_owned()
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user