Skip to content

Commit 0b39e74

Browse files
committed
upgrade to yew 0.22, fix #51
1 parent a4f7a41 commit 0b39e74

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

crates/yew-hooks/src/hooks/use_drop.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ pub struct UseDropHandle {
6161
/// <div ref={node}>
6262
/// <p><b>{ " Files: " }</b></p>
6363
/// {if let Some(files) = &*state.files {
64-
/// html! {for files.iter().map(|file| {
65-
/// html! { <p> { file.name() }</p> }
66-
/// })}
64+
/// html! {for file in files.iter() {
65+
/// <p> { file.name() }</p>
66+
/// } }
6767
/// } else {
6868
/// html! {}
69-
/// }}
69+
/// }}
7070
/// <p><b>{ " Text: " }</b></p>
7171
/// {if let Some(text) = &*state.text {
7272
/// html! {<p>{ text }</p>}

crates/yew-hooks/src/hooks/use_infinite_scroll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use super::{use_debounce, use_event, use_latest};
3030
/// <div ref={node}>
3131
/// {
3232
/// for state.current().iter().map(|element| {
33-
/// html! { <p>{ element }</p> }
33+
/// html! { <p>{ *element }</p> }
3434
/// })
3535
/// }
3636
/// </div>

crates/yew-hooks/src/hooks/use_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ where
158158
/// {
159159
/// for map.current().iter().map(|(k, v)| {
160160
/// html! {
161-
/// <p><b>{ k }</b> {": "} { v }</p>
161+
/// <p><b>{ *k }</b> {": "} { v }</p>
162162
/// }
163163
/// })
164164
/// }

crates/yew-hooks/src/hooks/use_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ where
135135
/// {
136136
/// for queue.current().iter().map(|v| {
137137
/// html! {
138-
/// <p><b>{ v }</b></p>
138+
/// <p><b>{ *v }</b></p>
139139
/// }
140140
/// })
141141
/// }

crates/yew-hooks/src/hooks/use_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ where
154154
/// {
155155
/// for set.current().iter().map(|v| {
156156
/// html! {
157-
/// <p><b>{ v }</b></p>
157+
/// <p><b>{ *v }</b></p>
158158
/// }
159159
/// })
160160
/// }

0 commit comments

Comments
 (0)