Stop using many nested modules in public API
commite604deb3be328127f9ad1b632461d2de7b271ec9
authorNick Fitzgerald <fitzgen@gmail.com>
dateTue 22 Jan 2019, 15:39 (8 years ago)
parentbf8e6bc
examples/counter/crate/src/lib.rs+1−1
@@ -22,7 +22,7 @@ impl Counter {
2222}
2323
2424impl 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>
2626 where
2727 'a: 'bump,
2828 {
examples/hello-world/crate/src/lib.rs+1−1
@@ -11,7 +11,7 @@ impl<'who> HelloWorld<'who> {
1111}
1212
1313impl<'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>
1515 where
1616 'a: 'bump,
1717 {
examples/input-form/crate/src/lib.rs+1−1
@@ -19,7 +19,7 @@ impl SayHelloTo {
1919}
2020
2121impl 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>
2323 where
2424 'a: 'bump,
2525 {
src/lib.rs+6−2
@@ -1,9 +1,13 @@
11use bumpalo::Bump;
22
3+// Only `pub` so that the wasm-bindgen bindings work.
4+#[doc(hidden)]
35pub mod change_list;
4−pub mod node;
5−pub mod vdom;
66
7+mod node;
8+mod vdom;
9+
10+// Re-export items at the top level.
711pub use self::node::{Attribute, ElementNode, Node, TextNode};
812pub use self::vdom::Vdom;
913
tests/web.rs+1−5
@@ -3,11 +3,7 @@
33#![cfg(target_arch = "wasm32")]
44
55use bumpalo::Bump;
6−use dodrio::{
7− node::{Attribute, Node},
8− vdom::Vdom,
9− Render,
10−};
6+use dodrio::{Attribute, Node, Render, Vdom};
117use log::*;
128use wasm_bindgen::JsCast;
139use wasm_bindgen_test::*;