Skip to content

Commit

Permalink
yew-macro: fix inability to set the autoplay atribute (yewstack#1866)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakape authored and ranile committed Jun 5, 2021
1 parent dd90fd3 commit 6978e23
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/yew-macro/src/props/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ lazy_static! {
vec![
"async",
"autofocus",
"autoplay",
"controls",
"default",
"defer",
Expand Down
4 changes: 2 additions & 2 deletions packages/yew-macro/tests/html_macro/block-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
15 | <>{ for (0..3).map(|_| not_tree()) }</>
| ^^^^^^ `()` cannot be formatted with the default formatter
|
::: $WORKSPACE/packages/yew/src/utils.rs
::: $WORKSPACE/packages/yew/src/utils.rs:76:8
|
| T: Into<R>,
76 | T: Into<R>,
| ------- required by this bound in `into_node_iter`
|
= help: the trait `std::fmt::Display` is not implemented for `()`
Expand Down
1 change: 1 addition & 0 deletions packages/yew-macro/tests/html_macro/html-element-pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fn compile_pass() {
<option selected=true disabled=false value="">{"Selected"}</option>
<option selected=false disabled=true value="">{"Unselected"}</option>
</select>
<video autoplay=true controls=true />
</div>
<svg width="149" height="147" viewBox="0 0 149 147" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M60.5776 13.8268L51.8673 42.6431L77.7475 37.331L60.5776 13.8268Z" fill="#DEB819"/>
Expand Down
4 changes: 2 additions & 2 deletions packages/yew-macro/tests/html_macro/iterable-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ error[E0277]: `()` is not an iterator
18 | { for () }
| ^^ `()` is not an iterator
|
::: $WORKSPACE/packages/yew/src/utils.rs
::: $WORKSPACE/packages/yew/src/utils.rs:75:9
|
| IT: IntoIterator<Item = T>,
75 | IT: IntoIterator<Item = T>,
| ---------------------- required by this bound in `into_node_iter`
|
= help: the trait `Iterator` is not implemented for `()`
Expand Down

0 comments on commit 6978e23

Please sign in to comment.