You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If i use the following code with std::Cow - will be ok
let string = "hello".to_string();let cow:Cow<str> = Cow::from(&string);
but beef::Cow tells me:
error[E0277]: the trait bound `String: beef::traits::internal::Beef` is not satisfied
--> src\main.rs:6:35
|
6 | let cow: Cow<str> = Cow::from(&string);
| --------- ^^^^^^^ the trait `beef::traits::internal::Beef` is not implemented for `String`
| |
| required by a bound introduced by this call
|
= help: the trait `beef::traits::internal::Beef` is implemented for `str`
note: required by a bound in `beef::generic::Cow`
--> F:\Rust\beef\src\generic.rs:26:23
|
26 | pub struct Cow<'a, T: Beef + ?Sized + 'a, U: Capacity> {
| ^^^^ required by this bound in `beef::generic::Cow`
Maybe you need an explicit impl From<&str> for Cow in addition to From<&T>?
Or is it not important?
The text was updated successfully, but these errors were encountered:
If i use the following code with
std::Cow
- will be okbut
beef::Cow
tells me:Maybe you need an explicit impl
From<&str>
forCow
in addition toFrom<&T>
?Or is it not important?
The text was updated successfully, but these errors were encountered: