on master help sign in
Stop using many nested modules in public API
e604debNick Fitzgerald
examples/counter/crate/src/lib.rs+1−1
@@ -22,7 +22,7 @@ impl Counter {
22}
22}
23
23
24impl Render for Counter {
24impl Render for Counter {
25− fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> dodrio::node::Node<'bump>
25+ fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> dodrio::Node<'bump>
26 where
26 where
27 'a: 'bump,
27 'a: 'bump,
28 {
28 {
examples/hello-world/crate/src/lib.rs+1−1
@@ -11,7 +11,7 @@ impl<'who> HelloWorld<'who> {
11}
11}
12
12
13impl<'who> Render for HelloWorld<'who> {
13impl<'who> Render for HelloWorld<'who> {
14− fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> dodrio::node::Node<'bump>
14+ fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> Node<'bump>
15 where
15 where
16 'a: 'bump,
16 'a: 'bump,
17 {
17 {
examples/input-form/crate/src/lib.rs+1−1
@@ -19,7 +19,7 @@ impl SayHelloTo {
19}
19}
20
20
21impl Render for SayHelloTo {
21impl Render for SayHelloTo {
22− fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> dodrio::node::Node<'bump>
22+ fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> dodrio::Node<'bump>
23 where
23 where
24 'a: 'bump,
24 'a: 'bump,
25 {
25 {
src/lib.rs+6−2
@@ -1,9 +1,13 @@
1use bumpalo::Bump;
1use bumpalo::Bump;
2
2
3+// Only `pub` so that the wasm-bindgen bindings work.
4+#[doc(hidden)]
3pub mod change_list;
5pub mod change_list;
4−pub mod node;
5−pub mod vdom;
6
6
7+mod node;
8+mod vdom;
9+
10+// Re-export items at the top level.
7pub use self::node::{Attribute, ElementNode, Node, TextNode};
11pub use self::node::{Attribute, ElementNode, Node, TextNode};
8pub use self::vdom::Vdom;
12pub use self::vdom::Vdom;
9
13
tests/web.rs+1−5
@@ -3,11 +3,7 @@
3#![cfg(target_arch = "wasm32")]
3#![cfg(target_arch = "wasm32")]
4
4
5use bumpalo::Bump;
5use bumpalo::Bump;
6−use dodrio::{
7− node::{Attribute, Node},
6+use dodrio::{Attribute, Node, Render, Vdom};
8− vdom::Vdom,
9− Render,
10−};
11use log::*;
7use log::*;
12use wasm_bindgen::JsCast;
8use wasm_bindgen::JsCast;
13use wasm_bindgen_test::*;
9use wasm_bindgen_test::*;