Problem
After merging in #1994 in a project code complains
the trait `From<Cow<'_, str>>` is not implemented for `AttrValue`
Currently these are implemented:
|
impl From<&'static str> for AttrValue { |
|
fn from(s: &'static str) -> Self { |
|
AttrValue::Static(s) |
|
} |
|
} |
|
|
|
impl From<String> for AttrValue { |
|
fn from(s: String) -> Self { |
|
AttrValue::Owned(s) |
|
} |
|
} |
|
|
|
impl From<Rc<str>> for AttrValue { |
|
fn from(s: Rc<str>) -> Self { |
|
AttrValue::Rc(s) |
|
} |
|
} |
Doesn't make sense to omit Cow<'_, str>, as #1994 says
This PR introduces a new type, AttrValue, for attribute values. This is a replacement for Cow<'static, str>
Environment:
Problem
After merging in #1994 in a project code complains
Currently these are implemented:
yew/packages/yew/src/virtual_dom/mod.rs
Lines 68 to 84 in 47fad81
Doesn't make sense to omit
Cow<'_, str>, as #1994 saysEnvironment:
master]