Skip to content

Commit b63ff7b

Browse files
committed
Move ToHtml to yew::html.
1 parent 7f74c96 commit b63ff7b

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

packages/yew/src/html/conversion.rs renamed to packages/yew/src/html/conversion/into_prop_value.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ use std::rc::Rc;
33
use implicit_clone::unsync::{IArray, IMap};
44
pub use implicit_clone::ImplicitClone;
55

6-
use super::super::callback::Callback;
7-
use super::{BaseComponent, ChildrenRenderer, Component, NodeRef, Scope};
8-
use crate::virtual_dom::{AttrValue, ToHtml, VChild, VNode, VText};
6+
use super::ToHtml;
7+
use crate::callback::Callback;
8+
use crate::html::{BaseComponent, ChildrenRenderer, Component, NodeRef, Scope};
9+
use crate::virtual_dom::{AttrValue, VChild, VNode, VText};
910

1011
impl ImplicitClone for NodeRef {}
1112
impl<Comp: Component> ImplicitClone for Scope<Comp> {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mod into_prop_value;
2+
mod to_html;
3+
4+
pub use into_prop_value::*;
5+
pub use to_html::*;

packages/yew/src/virtual_dom/to_html.rs renamed to packages/yew/src/html/conversion/to_html.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use std::borrow::Cow;
22
use std::rc::Rc;
33
use std::sync::Arc;
44

5-
use super::{VChild, VList, VNode, VText};
65
use crate::html::{ChildrenRenderer, IntoPropValue};
6+
use crate::virtual_dom::{VChild, VList, VNode, VText};
77
use crate::{AttrValue, BaseComponent, Html};
88

99
/// A trait implemented for types be rendered as a part of a Html.

packages/yew/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,11 @@ pub mod prelude {
336336
pub use crate::functional::*;
337337
pub use crate::html::{
338338
create_portal, BaseComponent, Children, ChildrenWithProps, Classes, Component, Context,
339-
Html, HtmlResult, NodeRef, Properties,
339+
Html, HtmlResult, NodeRef, Properties, ToHtml,
340340
};
341341
pub use crate::macros::{classes, html, html_nested};
342342
pub use crate::suspense::Suspense;
343-
pub use crate::virtual_dom::{AttrValue, ToHtml};
343+
pub use crate::virtual_dom::AttrValue;
344344
}
345345

346346
pub use self::prelude::*;

packages/yew/src/virtual_dom/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ pub mod vtag;
2121
#[doc(hidden)]
2222
pub mod vtext;
2323

24-
mod to_html;
25-
2624
use std::hint::unreachable_unchecked;
2725

2826
use indexmap::IndexMap;
29-
pub use to_html::ToHtml;
3027

3128
#[doc(inline)]
3229
pub use self::key::Key;

0 commit comments

Comments
 (0)