Closed CosminPerRam closed 3 months ago
Thanks!
While you are at it, would you mind updating all the translations methods to return an &'static str
?
I think there are some cases where I actually don't need them to be strings, so this should be more efficient.
In cases String
s are actually needed, it'd be nice updating the code where the function is invoked calling .to_string()
and leaving &str
as return value of the method.
Although there is a mix usage of &'static str
, String
and Text<'static, StyleType>
, I ought here to replace only the non-parameter-composing String
instances as replacing Text
ones would require bigger changes (that can be done in another PR).
Although there is a mix usage of
&'static str
,String
andText<'static, StyleType>
, I ought here to replace only the non-parameter-composingString
instances as replacingText
ones would require bigger changes (that can be done in another PR).
I agree, and I'm fine with this.
@all-contributors please add @CosminPerRam for code.
@GyulyVGC
I've put up a pull request to add @CosminPerRam! :tada:
This is a part of #523 (the non-lint part of it). This PR removes an unnecessary
to_string
call on an alreadyString
value and replaces per-item.to_string()
with an entire match block.to_string()
.