error[E0277]: the trait boundStyleSource: From<&str>` is not satisfied
--> src\app.rs:73:17
73
let style = Style::new("background-color: black;").expect("Faile...
^^^^^^^^^^ the trait From<&str> is not implemented for
StyleSource
= help: the trait From<Sheet> is implemented for StyleSource
= note: required for &str to implement Into<StyleSource>
= note: required for StyleSource to implement TryFrom<&str>
`
I am using this crate version 0.11.0 with "yew" feature, I saw the code worked well on some other guys' machine. But mine just doesn't work;
Could somebody explain to me why this happend?
This is a breaking change happened in v0.11. The runtime parser is disabled by default after v0.11. To use plain string, you can enable the parser feature.
I got below error while using the example code:
error[E0277]: the trait bound
StyleSource: From<&str>` is not satisfied --> src\app.rs:73:17From<&str>
is not implemented forStyleSource
= help: the trait
From<Sheet>
is implemented forStyleSource
= note: required for&str
to implementInto<StyleSource>
= note: required forStyleSource
to implementTryFrom<&str>
`I am using this crate version 0.11.0 with "yew" feature, I saw the code worked well on some other guys' machine. But mine just doesn't work; Could somebody explain to me why this happend?