-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error[E0277]: the trait bound CowStr<'_>: From<&&String>
is not satisfied
#92
Comments
Updated my code to: let key = self.my_string.as_str();
let translation = t!(key); and it works. But I don't get why the old syntax was working and is not anymore. |
I got the same error and tried to solve in the same way. Now those lines don't give me error anymore, unfortunately it's not enough because I have another problem. In my lib.rs I have these commands without calling rust_i18n::i18n!() I can't use the library, but now these command gives me always the error |
me too |
I'm sorry about this, this is looks like we recent changes not converted all case. In PR #73 But, I don't think we need to support In your case here, I have some quesions:
|
It's ok I don't need it. I just use In my case, we have some static and some dynamic strings. let unit_key = format!("{}.Description", key);
let translation = t!(unit_key);
if !unit_key.eq(&translation) {
// translation found, do something with it
} In this example, it is ok because I just created the String and own it. But sometimes, this String is inside another Struct and I could't move it (because the struct needed it) so I used this |
Hello,
I have updated rust-i18n from 3.0.1 to 3.1.2.
My project does not compile anymore with the error message :
error[E0277]: the trait bound
CowStr<'_>: From<&&String>
is not satisfied^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait
From<&&String>
is not implemented forCowStr<'_>
Am I doing something wrong now or the api changed in 3.1.2?
The text was updated successfully, but these errors were encountered: