Skip to content

Commit 047e079

Browse files
committed
Fix issues after cherry-picking
1 parent 6978e23 commit 047e079

File tree

7 files changed

+12
-14
lines changed

7 files changed

+12
-14
lines changed

examples/router/src/pages/post.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::{content, generator::Generated, Route};
22
use content::PostPart;
3+
use std::borrow::Cow;
34
use yew::prelude::*;
45
use yew_router::prelude::*;
56

@@ -46,7 +47,7 @@ impl Component for Post {
4647
html! {
4748
<>
4849
<section class="hero is-medium is-light has-background">
49-
<img class="hero-background is-transparent" src=post.meta.image_url />
50+
<img class="hero-background is-transparent" src=Cow::Owned(post.meta.image_url.clone()) />
5051
<div class="hero-body">
5152
<div class="container">
5253
<h1 class="title">
@@ -77,7 +78,7 @@ impl Post {
7778
<article class="media block box my-6">
7879
<figure class="media-left">
7980
<p class="image is-64x64">
80-
<img src=quote.author.image_url loading="lazy" />
81+
<img src=Cow::Owned(quote.author.image_url.clone()) loading="lazy" />
8182
</p>
8283
</figure>
8384
<div class="media-content">
@@ -97,7 +98,7 @@ impl Post {
9798
fn render_section_hero(&self, section: &content::Section) -> Html {
9899
html! {
99100
<section class="hero is-dark has-background mt-6 mb-3">
100-
<img class="hero-background is-transparent" src=section.image_url loading="lazy" />
101+
<img class="hero-background is-transparent" src=Cow::Owned(section.image_url.clone()) loading="lazy" />
101102
<div class="hero-body">
102103
<div class="container">
103104
<h2 class="subtitle">{ &section.title }</h2>

packages/yew-macro/tests/html_macro/block-fail.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
3434
15 | <>{ for (0..3).map(|_| not_tree()) }</>
3535
| ^^^^^^ `()` cannot be formatted with the default formatter
3636
|
37-
::: $WORKSPACE/packages/yew/src/utils.rs:76:8
37+
::: $WORKSPACE/packages/yew/src/utils.rs
3838
|
39-
76 | T: Into<R>,
39+
| T: Into<R>,
4040
| ------- required by this bound in `into_node_iter`
4141
|
4242
= help: the trait `std::fmt::Display` is not implemented for `()`

packages/yew-macro/tests/html_macro/iterable-fail.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ error[E0277]: `()` is not an iterator
7070
18 | { for () }
7171
| ^^ `()` is not an iterator
7272
|
73-
::: $WORKSPACE/packages/yew/src/utils.rs:75:9
73+
::: $WORKSPACE/packages/yew/src/utils.rs
7474
|
75-
75 | IT: IntoIterator<Item = T>,
75+
| IT: IntoIterator<Item = T>,
7676
| ---------------------- required by this bound in `into_node_iter`
7777
|
7878
= help: the trait `Iterator` is not implemented for `()`

packages/yew-router-macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "yew-router-macro"
3-
version = "0.14.0"
3+
version = "0.15.0"
44
authors = ["Hamza <muhammadhamza1311@gmail.com>"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"

packages/yew-router/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "yew-router"
3-
version = "0.14.0"
3+
version = "0.15.0"
44
authors = ["Hamza <muhammadhamza1311@gmail.com>"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"

packages/yew-router/tests/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn component() -> Html {
6161
<a onclick=onclick>{"click me"}</a>
6262
</>
6363
},
64-
Routes::No { id } => html! { <No id=id /> },
64+
Routes::No { id } => html! { <No id=*id /> },
6565
Routes::NotFound => html! { <div id="result">{"404"}</div> },
6666
}
6767
});

packages/yew/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@ slab = "0.4"
3030
thiserror = "1"
3131
wasm-bindgen = "0.2.74"
3232
wasm-bindgen-futures = "0.4"
33-
yew-macro = { version = "0.17.0", path = "../yew-macro" }
33+
yew-macro = { version = "^0.18.0", path = "../yew-macro" }
3434

3535
# optional encodings
3636
bincode = { version = "1", optional = true }
3737
rmp-serde = { version = "0.15.0", optional = true }
3838
serde_cbor = { version = "0.11.1", optional = true }
3939
serde_yaml = { version = "0.8.4", optional = true }
4040
toml = { version = "0.5", optional = true }
41-
wasm-bindgen = { version = "0.2.60", optional = true }
42-
wasm-bindgen-futures = { version = "0.4", optional = true }
43-
yew-macro = { version = "^0.18.0", path = "../yew-macro" }
4441

4542
[dependencies.web-sys]
4643
version = "0.3"

0 commit comments

Comments
 (0)