diff --git a/packages/yew-macro/tests/classes_macro/classes-fail.stderr b/packages/yew-macro/tests/classes_macro/classes-fail.stderr index 4108805ba..2622e838e 100644 --- a/packages/yew-macro/tests/classes_macro/classes-fail.stderr +++ b/packages/yew-macro/tests/classes_macro/classes-fail.stderr @@ -17,16 +17,6 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied | ^^ the trait `From<{integer}>` is not implemented for `Classes` | = help: the following other types implement trait `From`: -<<<<<<< HEAD - > - >> - > - > - > - >> - >> - > -======= `Classes` implements `From<&Option>` `Classes` implements `From<&String>` `Classes` implements `From<&[T]>` @@ -35,7 +25,6 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied `Classes` implements `From>` `Classes` implements `From>` `Classes` implements `From` ->>>>>>> origin/master and $N others = note: required for `{integer}` to implement `Into` note: required by a bound in `Classes::push` @@ -51,16 +40,6 @@ error[E0277]: the trait bound `Classes: From<{float}>` is not satisfied | ^^^^ the trait `From<{float}>` is not implemented for `Classes` | = help: the following other types implement trait `From`: -<<<<<<< HEAD - > - >> - > - > - > - >> - >> - > -======= `Classes` implements `From<&Option>` `Classes` implements `From<&String>` `Classes` implements `From<&[T]>` @@ -69,7 +48,6 @@ error[E0277]: the trait bound `Classes: From<{float}>` is not satisfied `Classes` implements `From>` `Classes` implements `From>` `Classes` implements `From` ->>>>>>> origin/master and $N others = note: required for `{float}` to implement `Into` note: required by a bound in `Classes::push` @@ -88,16 +66,6 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied | required by a bound introduced by this call | = help: the following other types implement trait `From`: -<<<<<<< HEAD - > - >> - > - > - > - >> - >> - > -======= `Classes` implements `From<&Option>` `Classes` implements `From<&String>` `Classes` implements `From<&[T]>` @@ -106,7 +74,6 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied `Classes` implements `From>` `Classes` implements `From>` `Classes` implements `From` ->>>>>>> origin/master and $N others = note: required for `{integer}` to implement `Into` = note: required for `Classes` to implement `From>` @@ -125,16 +92,6 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied | ^^^^ the trait `From<{integer}>` is not implemented for `Classes` | = help: the following other types implement trait `From`: -<<<<<<< HEAD - > - >> - > - > - > - >> - >> - > -======= `Classes` implements `From<&Option>` `Classes` implements `From<&String>` `Classes` implements `From<&[T]>` @@ -143,7 +100,6 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied `Classes` implements `From>` `Classes` implements `From>` `Classes` implements `From` ->>>>>>> origin/master and $N others = note: required for `{integer}` to implement `Into` = note: required for `Classes` to implement `From>` @@ -162,16 +118,6 @@ error[E0277]: the trait bound `Classes: From` is not satisfied | ^^^^ the trait `From` is not implemented for `Classes` | = help: the following other types implement trait `From`: -<<<<<<< HEAD - > - >> - > - > - > - >> - >> - > -======= `Classes` implements `From<&Option>` `Classes` implements `From<&String>` `Classes` implements `From<&[T]>` @@ -180,7 +126,6 @@ error[E0277]: the trait bound `Classes: From` is not satisfied `Classes` implements `From>` `Classes` implements `From>` `Classes` implements `From` ->>>>>>> origin/master and $N others = note: required for `u32` to implement `Into` = note: required for `Classes` to implement `From>` @@ -199,16 +144,6 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied | ^^ the trait `From<{integer}>` is not implemented for `Classes` | = help: the following other types implement trait `From`: -<<<<<<< HEAD - > - >> - > - > - > - >> - >> - > -======= `Classes` implements `From<&Option>` `Classes` implements `From<&String>` `Classes` implements `From<&[T]>` @@ -217,7 +152,6 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied `Classes` implements `From>` `Classes` implements `From>` `Classes` implements `From` ->>>>>>> origin/master and $N others = note: required for `{integer}` to implement `Into` note: required by a bound in `Classes::push` diff --git a/packages/yew-macro/tests/html_macro/element-fail.stderr b/packages/yew-macro/tests/html_macro/element-fail.stderr index 45f3b2ad7..8488c5cea 100644 --- a/packages/yew-macro/tests/html_macro/element-fail.stderr +++ b/packages/yew-macro/tests/html_macro/element-fail.stderr @@ -465,16 +465,6 @@ error[E0277]: the trait bound `NotToString: IntoPropValue>` is not implemented for `NotToString` | = help: the following other types implement trait `IntoPropValue`: -<<<<<<< HEAD - <&'static [(K, V)] as IntoPropValue>> - <&'static [T] as IntoPropValue>> - <&'static str as IntoPropValue> - <&'static str as IntoPropValue>> - <&'static str as IntoPropValue>> - <&'static str as IntoPropValue> - <&'static str as IntoPropValue> - <&ChildrenRenderer as IntoPropValue> -======= `&'static [(K, V)]` implements `IntoPropValue>` `&'static [T]` implements `IntoPropValue>` `&'static str` implements `IntoPropValue` @@ -482,27 +472,13 @@ error[E0277]: the trait bound `NotToString: IntoPropValue>` `&'static str` implements `IntoPropValue` `&'static str` implements `IntoPropValue` - `&String` implements `IntoPropValue` ->>>>>>> origin/master + `&ChildrenRenderer` implements `IntoPropValue` and $N others error[E0277]: the trait bound `Option: IntoPropValue>` is not satisfied --> tests/html_macro/element-fail.rs:47:23 | 47 | html! { }; -<<<<<<< HEAD - | ^^^^ the trait `IntoPropValue>` is not implemented for `Option` - | - = help: the following other types implement trait `IntoPropValue`: - as IntoPropValue>> - as IntoPropValue>> - > as IntoPropValue>> - as IntoPropValue>>> - > as IntoPropValue>> - as IntoPropValue>> - > as IntoPropValue>>> - as IntoPropValue> -======= | ----^^^^^^^^^^^^^ | | | the trait `IntoPropValue>` is not implemented for `Option` @@ -517,25 +493,11 @@ error[E0277]: the trait bound `Option: IntoPropValue` implements `IntoPropValue>` `Option>` implements `IntoPropValue>>` `Option` implements `IntoPropValue` ->>>>>>> origin/master error[E0277]: the trait bound `Option<{integer}>: IntoPropValue>` is not satisfied --> tests/html_macro/element-fail.rs:48:22 | 48 | html! { }; -<<<<<<< HEAD - | ^^^^ the trait `IntoPropValue>` is not implemented for `Option<{integer}>` - | - = help: the following other types implement trait `IntoPropValue`: - as IntoPropValue>> - as IntoPropValue>> - > as IntoPropValue>> - as IntoPropValue>>> - > as IntoPropValue>> - as IntoPropValue>> - > as IntoPropValue>>> - as IntoPropValue> -======= | ----^^^ | | | the trait `IntoPropValue>` is not implemented for `Option<{integer}>` @@ -550,7 +512,6 @@ error[E0277]: the trait bound `Option<{integer}>: IntoPropValue` implements `IntoPropValue>` `Option>` implements `IntoPropValue>>` `Option` implements `IntoPropValue` ->>>>>>> origin/master error[E0277]: the trait bound `{integer}: IntoEventCallback` is not satisfied --> tests/html_macro/element-fail.rs:51:28 @@ -660,17 +621,6 @@ error[E0277]: the trait bound `Option: IntoPropValue | required by a bound introduced by this call | = help: the following other types implement trait `IntoPropValue`: -<<<<<<< HEAD - as IntoPropValue>> - as IntoPropValue>> - > as IntoPropValue>> - as IntoPropValue>>> - > as IntoPropValue>> - as IntoPropValue>> - > as IntoPropValue>>> - as IntoPropValue> - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) -======= `Option<&str>` implements `IntoPropValue>` `Option<&str>` implements `IntoPropValue>` `Option>` implements `IntoPropValue>` @@ -679,7 +629,6 @@ error[E0277]: the trait bound `Option: IntoPropValue `Option` implements `IntoPropValue>` `Option>` implements `IntoPropValue>>` `Option` implements `IntoPropValue` ->>>>>>> origin/master error[E0277]: the trait bound `yew::Callback: IntoEventCallback` is not satisfied --> tests/html_macro/element-fail.rs:58:29 @@ -716,16 +665,6 @@ error[E0277]: the trait bound `NotToString: IntoPropValue>` is not implemented for `NotToString` | = help: the following other types implement trait `IntoPropValue`: -<<<<<<< HEAD - <&'static [(K, V)] as IntoPropValue>> - <&'static [T] as IntoPropValue>> - <&'static str as IntoPropValue> - <&'static str as IntoPropValue>> - <&'static str as IntoPropValue>> - <&'static str as IntoPropValue> - <&'static str as IntoPropValue> - <&ChildrenRenderer as IntoPropValue> -======= `&'static [(K, V)]` implements `IntoPropValue>` `&'static [T]` implements `IntoPropValue>` `&'static str` implements `IntoPropValue` @@ -733,8 +672,7 @@ error[E0277]: the trait bound `NotToString: IntoPropValue>` `&'static str` implements `IntoPropValue` `&'static str` implements `IntoPropValue` - `&String` implements `IntoPropValue` ->>>>>>> origin/master + `&ChildrenRenderer` implements `IntoPropValue` and $N others error[E0277]: the trait bound `(): IntoPropValue` is not satisfied @@ -751,20 +689,6 @@ error[E0277]: the trait bound `(): IntoPropValue` is not satisfied = help: for that trait implementation, expected `VNode`, found `yew::NodeRef` error[E0277]: the trait bound `implicit_clone::unsync::string::IString: From<{integer}>` is not satisfied -<<<<<<< HEAD - --> tests/html_macro/element-fail.rs:77:16 - | -77 | html! { <@{55}> }; - | ^^ the trait `From<{integer}>` is not implemented for `implicit_clone::unsync::string::IString` - | - = help: the following other types implement trait `From`: - > - > - >> - >> - > - = note: required because of the requirements on the impl of `Into` for `{integer}` -======= --> tests/html_macro/element-fail.rs:79:16 | 79 | html! { <@{55}> }; @@ -778,4 +702,3 @@ error[E0277]: the trait bound `implicit_clone::unsync::string::IString: From<{in `implicit_clone::unsync::string::IString` implements `From>` `implicit_clone::unsync::string::IString` implements `From` = note: required for `{integer}` to implement `Into` ->>>>>>> origin/master diff --git a/packages/yew/src/virtual_dom/vlist.rs b/packages/yew/src/virtual_dom/vlist.rs index 8ca20875e..95fded9d5 100644 --- a/packages/yew/src/virtual_dom/vlist.rs +++ b/packages/yew/src/virtual_dom/vlist.rs @@ -143,7 +143,11 @@ impl VList { fully_keyed: FullyKeyedState, ) -> Self { VList { - children: Some(Rc::new(children)), + children: if children.is_empty() { + None + } else { + Some(Rc::new(children)) + }, fully_keyed, key, }