on 0290e8b help sign in
40 files changed+1017−1213
since splitsnapshots
unifiedsplit
.travis.yml+12−18 Cargo.lock+504−500 Cargo.toml+16−16 README.md−9 benches/benches.rs+22−9 crates/js-api/Cargo.toml+7−6 crates/js-api/src/lib.rs+10−13 examples/counter/Cargo.toml+5−5 examples/counter/src/lib.rs+2−2 examples/game-of-life/Cargo.toml+6−5 examples/game-of-life/src/lib.rs+12−17 examples/hello-world/Cargo.toml+3−3 examples/hello-world/src/lib.rs+2−2 examples/input-form/Cargo.toml+3−3 examples/input-form/src/lib.rs+2−2 examples/js-component/Cargo.toml+3−3 examples/js-component/src/lib.rs+2−2 examples/moire/Cargo.toml+9−8 examples/moire/src/lib.rs+4−4 examples/sierpinski-triangle/Cargo.toml+6−5 examples/sierpinski-triangle/src/lib.rs+4−4 examples/todomvc/Cargo.toml+12−11 examples/todomvc/src/router.rs+19−22 examples/todomvc/src/todo.rs+21−77 examples/todomvc/src/todos.rs+3−3 src/cached.rs+7−39 src/change_list/mod.rs+2−2 src/change_list/traversal.rs+1−1 src/diff.rs+6−6 src/events.rs+2−2 src/lib.rs+3−3 src/render.rs+16−43 src/render_context.rs+1−1 src/vdom.rs+77−82 tests/web/cached.rs+65−73 tests/web/events.rs+73−56 tests/web/js_api.rs+37−30 tests/web/keyed.rs+19−18 tests/web/main.rs+17−19 tests/web/render.rs+2−89
.travis.yml+12−18
@@ -25,30 +25,24 @@ matrix:
2525 - name: "build (beta)"
2626 rust: beta
2727 script: INSTALL=1 ./build.sh
28+ - name: "build (nightly)"
29+ rust: nightly
30+ script: INSTALL=1 ./build.sh
2831 - name: "headless browser tests (firefox)"
2932 rust: stable
3033 addons:
3134 firefox: latest
3235 script: wasm-pack test --firefox --headless -- --features xxx-unstable-internal-use-only
36+ - name: "headless browser tests (chrome)"
37+ rust: stable
38+ addons:
39+ chrome: stable
40+ script: wasm-pack test --chrome --headless -- --features xxx-unstable-internal-use-only
3341 - name: "native tests"
3442 rust: stable
3543 install: echo "no install"
3644 script: cargo test --all
37−
38− # TODO: A bug in `rustc` is making `js-sys` broken on nightly:
39− # https://github.com/rust-lang/rust/issues/69315
40− # - name: "build (nightly)"
41− # rust: nightly
42− # script: INSTALL=1 ./build.sh
43− # - name: "check native benches"
44− # rust: nightly
45− # install: echo "no install"
46− # script: cargo check --benches --features xxx-unstable-internal-use-only
47−
48− # TODO: `chromedriver` is complaining about ports or something. Temporarily
49− # disable in CI until we figure it out.
50− # - name: "headless browser tests (chrome)"
51− # rust: stable
52− # addons:
53− # chrome: stable
54− # script: wasm-pack test --chrome --headless -- --features xxx-unstable-internal-use-only
45+ - name: "check native benches"
46+ rust: nightly
47+ install: echo "no install"
48+ script: cargo check --benches --features xxx-unstable-internal-use-only
Cargo.lock+504−500
@@ -1,71 +1,104 @@
11# This file is automatically @generated by Cargo.
22# It is not intended for manual editing.
33[[package]]
4−name = "anyhow"
5−version = "1.0.25"
4+name = "aho-corasick"
5+version = "0.7.3"
66source = "registry+https://github.com/rust-lang/crates.io-index"
7+dependencies = [
8+ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
9+]
10+
11+[[package]]
12+name = "arrayvec"
13+version = "0.4.10"
14+source = "registry+https://github.com/rust-lang/crates.io-index"
15+dependencies = [
16+ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
17+]
718
819[[package]]
920name = "atty"
10−version = "0.2.13"
21+version = "0.2.11"
1122source = "registry+https://github.com/rust-lang/crates.io-index"
1223dependencies = [
13− "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
14− "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
24+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
25+ "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
26+ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
1527]
1628
1729[[package]]
1830name = "autocfg"
19−version = "0.1.7"
31+version = "0.1.2"
2032source = "registry+https://github.com/rust-lang/crates.io-index"
2133
2234[[package]]
23−name = "bitflags"
24−version = "1.2.1"
35+name = "backtrace"
36+version = "0.3.15"
2537source = "registry+https://github.com/rust-lang/crates.io-index"
38+dependencies = [
39+ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
40+ "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
41+ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
42+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
43+ "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
44+ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
45+]
2646
2747[[package]]
28−name = "bstr"
29−version = "0.2.8"
48+name = "backtrace-sys"
49+version = "0.1.28"
3050source = "registry+https://github.com/rust-lang/crates.io-index"
3151dependencies = [
32− "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
33− "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
34− "regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
35− "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
52+ "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)",
53+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
3654]
3755
56+[[package]]
57+name = "bitflags"
58+version = "1.0.5"
59+source = "registry+https://github.com/rust-lang/crates.io-index"
60+
3861[[package]]
3962name = "bumpalo"
40−version = "2.6.0"
63+version = "2.4.2"
4164source = "registry+https://github.com/rust-lang/crates.io-index"
4265
4366[[package]]
4467name = "byteorder"
45−version = "1.3.2"
68+version = "1.3.1"
4669source = "registry+https://github.com/rust-lang/crates.io-index"
4770
4871[[package]]
4972name = "cast"
50−version = "0.2.3"
73+version = "0.2.2"
74+source = "registry+https://github.com/rust-lang/crates.io-index"
75+
76+[[package]]
77+name = "cc"
78+version = "1.0.34"
5179source = "registry+https://github.com/rust-lang/crates.io-index"
52−dependencies = [
53− "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
54−]
5580
5681[[package]]
5782name = "cfg-if"
58−version = "0.1.10"
83+version = "0.1.9"
5984source = "registry+https://github.com/rust-lang/crates.io-index"
6085
6186[[package]]
6287name = "clap"
63−version = "2.33.0"
88+version = "2.32.0"
6489source = "registry+https://github.com/rust-lang/crates.io-index"
6590dependencies = [
66− "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
67− "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
68− "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
91+ "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
92+ "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
93+ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
94+]
95+
96+[[package]]
97+name = "cloudabi"
98+version = "0.0.3"
99+source = "registry+https://github.com/rust-lang/crates.io-index"
100+dependencies = [
101+ "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
69102]
70103
71104[[package]]
@@ -73,132 +106,122 @@ name = "console_error_panic_hook"
73106version = "0.1.6"
74107source = "registry+https://github.com/rust-lang/crates.io-index"
75108dependencies = [
76− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
77− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
109+ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
110+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
78111]
79112
80113[[package]]
81114name = "console_log"
82−version = "0.2.0"
115+version = "0.1.2"
83116source = "registry+https://github.com/rust-lang/crates.io-index"
84117dependencies = [
85− "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
86− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
118+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
119+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
87120]
88121
89122[[package]]
90123name = "criterion"
91−version = "0.3.3"
92−source = "registry+https://github.com/rust-lang/crates.io-index"
93−dependencies = [
94− "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
95− "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
96− "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
97− "criterion-plot 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
98− "csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
99− "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
100− "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
101− "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
102− "oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
103− "plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
104− "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
105− "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
106− "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
107− "serde_cbor 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
108− "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
109− "serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)",
110− "tinytemplate 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
111− "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
124+version = "0.2.11"
125+source = "registry+https://github.com/rust-lang/crates.io-index"
126+dependencies = [
127+ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
128+ "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
129+ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
130+ "criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
131+ "csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
132+ "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
133+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
134+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
135+ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
136+ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
137+ "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
138+ "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
139+ "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
140+ "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
141+ "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
142+ "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)",
143+ "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
144+ "tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
145+ "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
112146]
113147
114148[[package]]
115149name = "criterion-plot"
116−version = "0.4.3"
150+version = "0.3.1"
117151source = "registry+https://github.com/rust-lang/crates.io-index"
118152dependencies = [
119− "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
120− "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
153+ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
154+ "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
155+ "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
121156]
122157
123158[[package]]
124159name = "crossbeam-deque"
125−version = "0.7.2"
160+version = "0.2.0"
126161source = "registry+https://github.com/rust-lang/crates.io-index"
127162dependencies = [
128− "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
129− "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
163+ "crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
164+ "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
130165]
131166
132167[[package]]
133168name = "crossbeam-epoch"
134−version = "0.8.0"
135−source = "registry+https://github.com/rust-lang/crates.io-index"
136−dependencies = [
137− "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
138− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
139− "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
140− "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
141− "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
142− "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
143−]
144−
145−[[package]]
146−name = "crossbeam-queue"
147−version = "0.2.0"
169+version = "0.3.1"
148170source = "registry+https://github.com/rust-lang/crates.io-index"
149171dependencies = [
150− "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
172+ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
173+ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
174+ "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
175+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
176+ "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
177+ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
178+ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
151179]
152180
153181[[package]]
154182name = "crossbeam-utils"
155−version = "0.7.0"
183+version = "0.2.2"
156184source = "registry+https://github.com/rust-lang/crates.io-index"
157185dependencies = [
158− "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
159− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
160− "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
186+ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
161187]
162188
163189[[package]]
164190name = "csv"
165−version = "1.1.1"
191+version = "1.0.5"
166192source = "registry+https://github.com/rust-lang/crates.io-index"
167193dependencies = [
168− "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
169− "csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
170− "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
171− "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
172− "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
194+ "csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
195+ "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
173196]
174197
175198[[package]]
176199name = "csv-core"
177−version = "0.1.6"
200+version = "0.1.5"
178201source = "registry+https://github.com/rust-lang/crates.io-index"
179202dependencies = [
180− "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
203+ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
181204]
182205
183206[[package]]
184207name = "dodrio"
185−version = "0.2.0"
208+version = "0.1.0"
186209dependencies = [
187− "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
188− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
189− "console_log 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
190− "criterion 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
191− "dodrio-js-api 0.2.0",
192− "futures 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
210+ "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
211+ "bumpalo 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
212+ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
213+ "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
214+ "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
215+ "dodrio-js-api 0.1.0",
216+ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
193217 "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
194− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
195− "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
218+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
219+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
196220 "longest-increasing-subsequence 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
197− "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
198− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
199− "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
200− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
201− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
221+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
222+ "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
223+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
224+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
202225]
203226
204227[[package]]
@@ -206,12 +229,12 @@ name = "dodrio-counter"
206229version = "0.1.0"
207230dependencies = [
208231 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
209− "console_log 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
210− "dodrio 0.2.0",
211− "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
212− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
213− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
214− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
232+ "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
233+ "dodrio 0.1.0",
234+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
235+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
236+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
237+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
215238]
216239
217240[[package]]
@@ -219,12 +242,13 @@ name = "dodrio-game-of-life"
219242version = "0.1.0"
220243dependencies = [
221244 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
222− "dodrio 0.2.0",
223− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
224− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
225− "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
226− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
227− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
245+ "dodrio 0.1.0",
246+ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
247+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
248+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
249+ "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
250+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
251+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
228252]
229253
230254[[package]]
@@ -232,10 +256,10 @@ name = "dodrio-hello-world"
232256version = "0.1.0"
233257dependencies = [
234258 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
235− "dodrio 0.2.0",
236− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
237− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
238− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
259+ "dodrio 0.1.0",
260+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
261+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
262+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
239263]
240264
241265[[package]]
@@ -243,21 +267,22 @@ name = "dodrio-input-form"
243267version = "0.1.0"
244268dependencies = [
245269 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
246− "dodrio 0.2.0",
247− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
248− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
249− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
270+ "dodrio 0.1.0",
271+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
272+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
273+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
250274]
251275
252276[[package]]
253277name = "dodrio-js-api"
254−version = "0.2.0"
278+version = "0.1.0"
255279dependencies = [
256− "dodrio 0.2.0",
257− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
258− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
259− "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
260− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
280+ "dodrio 0.1.0",
281+ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
282+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
283+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
284+ "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
285+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
261286]
262287
263288[[package]]
@@ -265,27 +290,28 @@ name = "dodrio-js-component"
265290version = "0.1.0"
266291dependencies = [
267292 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
268− "dodrio 0.2.0",
269− "dodrio-js-api 0.2.0",
270− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
271− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
272− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
293+ "dodrio 0.1.0",
294+ "dodrio-js-api 0.1.0",
295+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
296+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
297+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
273298]
274299
275300[[package]]
276301name = "dodrio-moire"
277302version = "0.1.0"
278303dependencies = [
279− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
304+ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
280305 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
281− "console_log 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
282− "dodrio 0.2.0",
283− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
284− "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
285− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
286− "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
287− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
288− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
306+ "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
307+ "dodrio 0.1.0",
308+ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
309+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
310+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
311+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
312+ "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
313+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
314+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
289315]
290316
291317[[package]]
@@ -293,189 +319,142 @@ name = "dodrio-sierpinski"
293319version = "0.1.0"
294320dependencies = [
295321 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
296− "dodrio 0.2.0",
297− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
298− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
299− "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
300− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
301− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
322+ "dodrio 0.1.0",
323+ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
324+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
325+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
326+ "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
327+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
328+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
302329]
303330
304331[[package]]
305332name = "dodrio-todomvc"
306333version = "0.1.0"
307334dependencies = [
308− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
335+ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
309336 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
310− "console_log 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
311− "dodrio 0.2.0",
312− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
313− "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
314− "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
315− "serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)",
316− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
317− "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
318− "wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
319− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
337+ "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
338+ "dodrio 0.1.0",
339+ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
340+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
341+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
342+ "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
343+ "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
344+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
345+ "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
346+ "wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
347+ "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
320348]
321349
322350[[package]]
323351name = "either"
324−version = "1.5.3"
352+version = "1.5.2"
325353source = "registry+https://github.com/rust-lang/crates.io-index"
326354
327355[[package]]
328−name = "futures"
329−version = "0.3.5"
356+name = "env_logger"
357+version = "0.6.1"
330358source = "registry+https://github.com/rust-lang/crates.io-index"
331359dependencies = [
332− "futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
333− "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
334− "futures-executor 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
335− "futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
336− "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
337− "futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
338− "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
360+ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
361+ "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
362+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
363+ "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
364+ "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
339365]
340366
341367[[package]]
342−name = "futures-channel"
343−version = "0.3.5"
344−source = "registry+https://github.com/rust-lang/crates.io-index"
345−dependencies = [
346− "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
347− "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
348−]
349−
350−[[package]]
351−name = "futures-core"
352−version = "0.3.5"
353−source = "registry+https://github.com/rust-lang/crates.io-index"
354−
355−[[package]]
356−name = "futures-executor"
357−version = "0.3.5"
368+name = "failure"
369+version = "0.1.5"
358370source = "registry+https://github.com/rust-lang/crates.io-index"
359371dependencies = [
360− "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
361− "futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
362− "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
372+ "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
373+ "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
363374]
364375
365376[[package]]
366−name = "futures-io"
367−version = "0.3.5"
368−source = "registry+https://github.com/rust-lang/crates.io-index"
369−
370−[[package]]
371−name = "futures-macro"
372−version = "0.3.5"
377+name = "failure_derive"
378+version = "0.1.5"
373379source = "registry+https://github.com/rust-lang/crates.io-index"
374380dependencies = [
375− "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
376− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
377− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
378− "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
381+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
382+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
383+ "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
384+ "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
379385]
380386
381387[[package]]
382−name = "futures-sink"
383−version = "0.3.5"
388+name = "fuchsia-cprng"
389+version = "0.1.1"
384390source = "registry+https://github.com/rust-lang/crates.io-index"
385391
386392[[package]]
387−name = "futures-task"
388−version = "0.3.5"
389−source = "registry+https://github.com/rust-lang/crates.io-index"
390−dependencies = [
391− "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
392−]
393−
394−[[package]]
395−name = "futures-util"
396−version = "0.3.5"
393+name = "futures"
394+version = "0.1.27"
397395source = "registry+https://github.com/rust-lang/crates.io-index"
398−dependencies = [
399− "futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
400− "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
401− "futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
402− "futures-macro 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
403− "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
404− "futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
405− "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
406− "pin-project 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)",
407− "pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
408− "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
409− "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
410− "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
411−]
412396
413397[[package]]
414398name = "fxhash"
415399version = "0.2.1"
416400source = "registry+https://github.com/rust-lang/crates.io-index"
417401dependencies = [
418− "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
402+ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
419403]
420404
421−[[package]]
422−name = "half"
423−version = "1.6.0"
424−source = "registry+https://github.com/rust-lang/crates.io-index"
425−
426405[[package]]
427406name = "heck"
428407version = "0.3.1"
429408source = "registry+https://github.com/rust-lang/crates.io-index"
430409dependencies = [
431− "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
410+ "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
432411]
433412
434413[[package]]
435−name = "hermit-abi"
436−version = "0.1.3"
414+name = "humantime"
415+version = "1.2.0"
437416source = "registry+https://github.com/rust-lang/crates.io-index"
438417dependencies = [
439− "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
418+ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
440419]
441420
442421[[package]]
443422name = "itertools"
444−version = "0.9.0"
423+version = "0.8.0"
445424source = "registry+https://github.com/rust-lang/crates.io-index"
446425dependencies = [
447− "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
426+ "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
448427]
449428
450429[[package]]
451430name = "itoa"
452−version = "0.4.4"
431+version = "0.4.3"
453432source = "registry+https://github.com/rust-lang/crates.io-index"
454433
455434[[package]]
456435name = "js-sys"
457−version = "0.3.32"
436+version = "0.3.19"
458437source = "registry+https://github.com/rust-lang/crates.io-index"
459438dependencies = [
460− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
439+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
461440]
462441
463442[[package]]
464443name = "lazy_static"
465−version = "1.4.0"
444+version = "1.3.0"
466445source = "registry+https://github.com/rust-lang/crates.io-index"
467446
468447[[package]]
469448name = "libc"
470−version = "0.2.66"
449+version = "0.2.51"
471450source = "registry+https://github.com/rust-lang/crates.io-index"
472451
473452[[package]]
474453name = "log"
475−version = "0.4.11"
454+version = "0.4.6"
476455source = "registry+https://github.com/rust-lang/crates.io-index"
477456dependencies = [
478− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
457+ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
479458]
480459
481460[[package]]
@@ -485,180 +464,175 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
485464
486465[[package]]
487466name = "memchr"
488−version = "2.2.1"
467+version = "2.2.0"
489468source = "registry+https://github.com/rust-lang/crates.io-index"
490469dependencies = [
491− "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
470+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
492471]
493472
494473[[package]]
495474name = "memoffset"
496−version = "0.5.3"
475+version = "0.2.1"
476+source = "registry+https://github.com/rust-lang/crates.io-index"
477+
478+[[package]]
479+name = "nodrop"
480+version = "0.1.13"
497481source = "registry+https://github.com/rust-lang/crates.io-index"
498−dependencies = [
499− "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
500−]
501482
502483[[package]]
503484name = "nom"
504485version = "4.2.3"
505486source = "registry+https://github.com/rust-lang/crates.io-index"
506487dependencies = [
507− "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
488+ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
508489 "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
509490]
510491
511492[[package]]
512493name = "num-traits"
513−version = "0.2.10"
494+version = "0.2.6"
514495source = "registry+https://github.com/rust-lang/crates.io-index"
515−dependencies = [
516− "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
517−]
518496
519497[[package]]
520498name = "num_cpus"
521−version = "1.11.1"
499+version = "1.10.0"
522500source = "registry+https://github.com/rust-lang/crates.io-index"
523501dependencies = [
524− "hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
525− "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
502+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
526503]
527504
528505[[package]]
529−name = "once_cell"
530−version = "1.3.1"
506+name = "proc-macro2"
507+version = "0.4.27"
531508source = "registry+https://github.com/rust-lang/crates.io-index"
509+dependencies = [
510+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
511+]
532512
533513[[package]]
534−name = "oorandom"
535−version = "11.1.0"
514+name = "quick-error"
515+version = "1.2.2"
536516source = "registry+https://github.com/rust-lang/crates.io-index"
537517
538518[[package]]
539−name = "pin-project"
540−version = "0.4.16"
519+name = "quote"
520+version = "0.6.11"
541521source = "registry+https://github.com/rust-lang/crates.io-index"
542522dependencies = [
543− "pin-project-internal 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)",
523+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
544524]
545525
546526[[package]]
547−name = "pin-project-internal"
548−version = "0.4.16"
527+name = "rand_core"
528+version = "0.3.1"
549529source = "registry+https://github.com/rust-lang/crates.io-index"
550530dependencies = [
551− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
552− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
553− "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
531+ "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
554532]
555533
556534[[package]]
557−name = "pin-utils"
558−version = "0.1.0"
535+name = "rand_core"
536+version = "0.4.0"
559537source = "registry+https://github.com/rust-lang/crates.io-index"
560538
561539[[package]]
562−name = "plotters"
563−version = "0.2.12"
540+name = "rand_os"
541+version = "0.1.3"
564542source = "registry+https://github.com/rust-lang/crates.io-index"
565543dependencies = [
566− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
567− "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
568− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
569− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
544+ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
545+ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
546+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
547+ "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
548+ "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
549+ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
570550]
571551
572552[[package]]
573−name = "proc-macro-hack"
574−version = "0.5.11"
553+name = "rand_xoshiro"
554+version = "0.1.0"
575555source = "registry+https://github.com/rust-lang/crates.io-index"
576556dependencies = [
577− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
578− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
579− "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
557+ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
558+ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
580559]
581560
582561[[package]]
583−name = "proc-macro-nested"
584−version = "0.1.3"
585−source = "registry+https://github.com/rust-lang/crates.io-index"
586−
587−[[package]]
588−name = "proc-macro2"
589−version = "1.0.18"
562+name = "rayon"
563+version = "1.0.3"
590564source = "registry+https://github.com/rust-lang/crates.io-index"
591565dependencies = [
592− "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
566+ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
567+ "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
568+ "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
593569]
594570
595571[[package]]
596−name = "quote"
597−version = "1.0.2"
572+name = "rayon-core"
573+version = "1.4.1"
598574source = "registry+https://github.com/rust-lang/crates.io-index"
599575dependencies = [
600− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
576+ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
577+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
578+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
579+ "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
601580]
602581
603582[[package]]
604−name = "rayon"
605−version = "1.3.0"
583+name = "rdrand"
584+version = "0.4.0"
606585source = "registry+https://github.com/rust-lang/crates.io-index"
607586dependencies = [
608− "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
609− "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
610− "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
587+ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
611588]
612589
613590[[package]]
614−name = "rayon-core"
615−version = "1.7.0"
591+name = "redox_syscall"
592+version = "0.1.52"
616593source = "registry+https://github.com/rust-lang/crates.io-index"
617−dependencies = [
618− "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
619− "crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
620− "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
621− "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
622− "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
623−]
624594
625595[[package]]
626−name = "regex"
627−version = "1.3.3"
596+name = "redox_termios"
597+version = "0.1.1"
628598source = "registry+https://github.com/rust-lang/crates.io-index"
629599dependencies = [
630− "regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
600+ "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)",
631601]
632602
633603[[package]]
634−name = "regex-automata"
635−version = "0.1.8"
604+name = "regex"
605+version = "1.1.5"
636606source = "registry+https://github.com/rust-lang/crates.io-index"
637607dependencies = [
638− "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
608+ "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
609+ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
610+ "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
611+ "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
612+ "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
639613]
640614
641615[[package]]
642616name = "regex-syntax"
643−version = "0.6.13"
617+version = "0.6.6"
644618source = "registry+https://github.com/rust-lang/crates.io-index"
619+dependencies = [
620+ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
621+]
645622
646623[[package]]
647−name = "rustc_version"
648−version = "0.2.3"
624+name = "rustc-demangle"
625+version = "0.1.13"
649626source = "registry+https://github.com/rust-lang/crates.io-index"
650−dependencies = [
651− "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
652−]
653627
654628[[package]]
655629name = "ryu"
656−version = "1.0.2"
630+version = "0.2.7"
657631source = "registry+https://github.com/rust-lang/crates.io-index"
658632
659633[[package]]
660634name = "same-file"
661−version = "1.0.5"
635+version = "1.0.4"
662636source = "registry+https://github.com/rust-lang/crates.io-index"
663637dependencies = [
664638 "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -671,109 +645,129 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
671645
672646[[package]]
673647name = "scopeguard"
674−version = "1.0.0"
648+version = "0.3.3"
675649source = "registry+https://github.com/rust-lang/crates.io-index"
676650
677651[[package]]
678−name = "semver"
679−version = "0.9.0"
652+name = "serde"
653+version = "1.0.91"
680654source = "registry+https://github.com/rust-lang/crates.io-index"
681655dependencies = [
682− "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
656+ "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)",
683657]
684658
685659[[package]]
686−name = "semver-parser"
687−version = "0.7.0"
660+name = "serde_derive"
661+version = "1.0.90"
688662source = "registry+https://github.com/rust-lang/crates.io-index"
663+dependencies = [
664+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
665+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
666+ "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
667+]
689668
690669[[package]]
691−name = "serde"
692−version = "1.0.114"
670+name = "serde_json"
671+version = "1.0.39"
693672source = "registry+https://github.com/rust-lang/crates.io-index"
694673dependencies = [
695− "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
674+ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
675+ "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
676+ "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
696677]
697678
698679[[package]]
699−name = "serde_cbor"
700−version = "0.11.1"
680+name = "sourcefile"
681+version = "0.1.4"
701682source = "registry+https://github.com/rust-lang/crates.io-index"
702−dependencies = [
703− "half 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
704− "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
705−]
706683
707684[[package]]
708−name = "serde_derive"
709−version = "1.0.114"
685+name = "syn"
686+version = "0.15.30"
710687source = "registry+https://github.com/rust-lang/crates.io-index"
711688dependencies = [
712− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
713− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
714− "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
689+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
690+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
691+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
715692]
716693
717694[[package]]
718−name = "serde_json"
719−version = "1.0.57"
695+name = "synstructure"
696+version = "0.10.1"
720697source = "registry+https://github.com/rust-lang/crates.io-index"
721698dependencies = [
722− "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
723− "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
724− "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
699+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
700+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
701+ "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
702+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
725703]
726704
727705[[package]]
728−name = "slab"
729−version = "0.4.2"
706+name = "termcolor"
707+version = "1.0.4"
730708source = "registry+https://github.com/rust-lang/crates.io-index"
709+dependencies = [
710+ "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
711+]
731712
732713[[package]]
733−name = "sourcefile"
734−version = "0.1.4"
714+name = "termion"
715+version = "1.5.1"
735716source = "registry+https://github.com/rust-lang/crates.io-index"
717+dependencies = [
718+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
719+ "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)",
720+ "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
721+]
736722
737723[[package]]
738−name = "syn"
739−version = "1.0.33"
724+name = "textwrap"
725+version = "0.10.0"
740726source = "registry+https://github.com/rust-lang/crates.io-index"
741727dependencies = [
742− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
743− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
744− "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
728+ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
745729]
746730
747731[[package]]
748−name = "textwrap"
749−version = "0.11.0"
732+name = "thread_local"
733+version = "0.3.6"
750734source = "registry+https://github.com/rust-lang/crates.io-index"
751735dependencies = [
752− "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
736+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
753737]
754738
755739[[package]]
756740name = "tinytemplate"
757−version = "1.1.0"
741+version = "1.0.1"
758742source = "registry+https://github.com/rust-lang/crates.io-index"
759743dependencies = [
760− "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
761− "serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)",
744+ "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
745+ "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
762746]
763747
748+[[package]]
749+name = "ucd-util"
750+version = "0.1.3"
751+source = "registry+https://github.com/rust-lang/crates.io-index"
752+
764753[[package]]
765754name = "unicode-segmentation"
766−version = "1.6.0"
755+version = "1.2.1"
767756source = "registry+https://github.com/rust-lang/crates.io-index"
768757
769758[[package]]
770759name = "unicode-width"
771−version = "0.1.6"
760+version = "0.1.5"
772761source = "registry+https://github.com/rust-lang/crates.io-index"
773762
774763[[package]]
775764name = "unicode-xid"
776−version = "0.2.0"
765+version = "0.1.0"
766+source = "registry+https://github.com/rust-lang/crates.io-index"
767+
768+[[package]]
769+name = "utf8-ranges"
770+version = "1.0.2"
777771source = "registry+https://github.com/rust-lang/crates.io-index"
778772
779773[[package]]
@@ -783,126 +777,126 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
783777
784778[[package]]
785779name = "walkdir"
786−version = "2.3.1"
780+version = "2.2.7"
787781source = "registry+https://github.com/rust-lang/crates.io-index"
788782dependencies = [
789− "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
790− "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
783+ "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
784+ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
791785 "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
792786]
793787
794788[[package]]
795789name = "wasm-bindgen"
796−version = "0.2.55"
790+version = "0.2.42"
797791source = "registry+https://github.com/rust-lang/crates.io-index"
798792dependencies = [
799− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
800− "wasm-bindgen-macro 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
793+ "wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
801794]
802795
803796[[package]]
804797name = "wasm-bindgen-backend"
805−version = "0.2.55"
798+version = "0.2.42"
806799source = "registry+https://github.com/rust-lang/crates.io-index"
807800dependencies = [
808− "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
809− "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
810− "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
811− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
812− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
813− "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
814− "wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
801+ "bumpalo 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
802+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
803+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
804+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
805+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
806+ "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
807+ "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
815808]
816809
817810[[package]]
818811name = "wasm-bindgen-futures"
819−version = "0.4.5"
812+version = "0.3.19"
820813source = "registry+https://github.com/rust-lang/crates.io-index"
821814dependencies = [
822− "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
823− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
824− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
825− "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
815+ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
816+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
817+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
826818]
827819
828820[[package]]
829821name = "wasm-bindgen-macro"
830−version = "0.2.55"
822+version = "0.2.42"
831823source = "registry+https://github.com/rust-lang/crates.io-index"
832824dependencies = [
833− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
834− "wasm-bindgen-macro-support 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
825+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
826+ "wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
835827]
836828
837829[[package]]
838830name = "wasm-bindgen-macro-support"
839−version = "0.2.55"
831+version = "0.2.42"
840832source = "registry+https://github.com/rust-lang/crates.io-index"
841833dependencies = [
842− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
843− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
844− "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
845− "wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
846− "wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
834+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
835+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
836+ "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
837+ "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
838+ "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
847839]
848840
849841[[package]]
850842name = "wasm-bindgen-shared"
851−version = "0.2.55"
843+version = "0.2.42"
852844source = "registry+https://github.com/rust-lang/crates.io-index"
853845
854846[[package]]
855847name = "wasm-bindgen-test"
856−version = "0.3.5"
848+version = "0.2.42"
857849source = "registry+https://github.com/rust-lang/crates.io-index"
858850dependencies = [
859851 "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
860− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
852+ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
853+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
861854 "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
862− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
863− "wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
864− "wasm-bindgen-test-macro 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
855+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
856+ "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
857+ "wasm-bindgen-test-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
865858]
866859
867860[[package]]
868861name = "wasm-bindgen-test-macro"
869−version = "0.3.5"
862+version = "0.2.42"
870863source = "registry+https://github.com/rust-lang/crates.io-index"
871864dependencies = [
872− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
873− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
865+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
866+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
874867]
875868
876869[[package]]
877870name = "wasm-bindgen-webidl"
878−version = "0.2.55"
871+version = "0.2.42"
879872source = "registry+https://github.com/rust-lang/crates.io-index"
880873dependencies = [
881− "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
874+ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
882875 "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
883− "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
884− "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
885− "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
886− "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
887− "wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
888− "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
876+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
877+ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
878+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
879+ "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
880+ "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
881+ "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
889882]
890883
891884[[package]]
892885name = "web-sys"
893−version = "0.3.32"
886+version = "0.3.19"
894887source = "registry+https://github.com/rust-lang/crates.io-index"
895888dependencies = [
896− "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
897− "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
889+ "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
890+ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
891+ "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
898892 "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
899− "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
900− "wasm-bindgen-webidl 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
893+ "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
894+ "wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
901895]
902896
903897[[package]]
904898name = "weedle"
905−version = "0.10.0"
899+version = "0.8.0"
906900source = "registry+https://github.com/rust-lang/crates.io-index"
907901dependencies = [
908902 "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -910,7 +904,7 @@ dependencies = [
910904
911905[[package]]
912906name = "winapi"
913−version = "0.3.8"
907+version = "0.3.7"
914908source = "registry+https://github.com/rust-lang/crates.io-index"
915909dependencies = [
916910 "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -927,7 +921,7 @@ name = "winapi-util"
927921version = "0.1.2"
928922source = "registry+https://github.com/rust-lang/crates.io-index"
929923dependencies = [
930− "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
924+ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
931925]
932926
933927[[package]]
@@ -935,101 +929,111 @@ name = "winapi-x86_64-pc-windows-gnu"
935929version = "0.4.0"
936930source = "registry+https://github.com/rust-lang/crates.io-index"
937931
932+[[package]]
933+name = "wincolor"
934+version = "1.0.1"
935+source = "registry+https://github.com/rust-lang/crates.io-index"
936+dependencies = [
937+ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
938+ "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
939+]
940+
938941[metadata]
939−"checksum anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9267dff192e68f3399525901e709a48c1d3982c9c072fa32f2127a0cb0babf14"
940−"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
941−"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
942−"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
943−"checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245"
944−"checksum bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad807f2fc2bf185eeb98ff3a901bd46dc5ad58163d0fa4577ba0d25674d71708"
945−"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
946−"checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0"
947−"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
948−"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
942+"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c"
943+"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71"
944+"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
945+"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799"
946+"checksum backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f106c02a3604afcdc0df5d36cc47b44b55917dbaf3d808f71c163a0ddba64637"
947+"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6"
948+"checksum bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bd1fa8ad26490b0a5cfec99089952250301b6716cdeaa7c9ab229598fb82ab66"
949+"checksum bumpalo 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "299f49401bb57849d1523425255b87e31ac78f2bbf4ac654cd681db25bc4a5d5"
950+"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb"
951+"checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427"
952+"checksum cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "30f813bf45048a18eda9190fd3c6b78644146056740c43172a5a3699118588fd"
953+"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
954+"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
955+"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
949956"checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211"
950−"checksum console_log 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494"
951−"checksum criterion 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "70daa7ceec6cf143990669a04c7df13391d55fb27bd4079d252fca774ba244d8"
952−"checksum criterion-plot 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e022feadec601fba1649cfa83586381a4ad31c6bf3a9ab7d408118b05dd9889d"
953−"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca"
954−"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac"
955−"checksum crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfd6515864a82d2f877b42813d4553292c6659498c9a2aa31bab5a15243c2700"
956−"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4"
957−"checksum csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37519ccdfd73a75821cac9319d4fce15a81b9fcf75f951df5b9988aa3a0af87d"
958−"checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c"
959−"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
960−"checksum futures 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613"
961−"checksum futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5"
962−"checksum futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399"
963−"checksum futures-executor 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314"
964−"checksum futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789"
965−"checksum futures-macro 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39"
966−"checksum futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc"
967−"checksum futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626"
968−"checksum futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6"
957+"checksum console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48"
958+"checksum criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394"
959+"checksum criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e"
960+"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
961+"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
962+"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
963+"checksum csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd1c44c58078cfbeaf11fbb3eac9ae5534c23004ed770cc4bfb48e658ae4f04"
964+"checksum csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5cdef62f37e6ffe7d1f07a381bc0db32b7a3ff1cac0de56cb0d81e71f53d65"
965+"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b"
966+"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a"
967+"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
968+"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
969+"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
970+"checksum futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)" = "a2037ec1c6c1c4f79557762eab1f7eae1f64f6cb418ace90fae88f0942b60139"
969971"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
970−"checksum half 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177"
971972"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
972−"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120"
973−"checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
974−"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
975−"checksum js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)" = "1c840fdb2167497b0bd0db43d6dfe61e91637fa72f9d061f8bd17ddc44ba6414"
976−"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
977−"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
978−"checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
973+"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114"
974+"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358"
975+"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
976+"checksum js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3c994fd445b81741d77f6bcd227d6ed645b95b35a2ecfd2050767450ff1c0b6d"
977+"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
978+"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917"
979+"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
979980"checksum longest-increasing-subsequence 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86"
980−"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
981−"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9"
981+"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
982+"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
983+"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
982984"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6"
983−"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4"
984−"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72"
985−"checksum once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b"
986−"checksum oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405"
987−"checksum pin-project 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)" = "81d480cb4e89522ccda96d0eed9af94180b7a5f93fb28f66e1fd7d68431663d1"
988−"checksum pin-project-internal 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)" = "a82996f11efccb19b685b14b5df818de31c1edcee3daa256ab5775dd98e72feb"
989−"checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
990−"checksum plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb"
991−"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
992−"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e"
993−"checksum proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa"
994−"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
995−"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098"
996−"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9"
997−"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87"
998−"checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9"
999−"checksum regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90"
1000−"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
1001−"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
1002−"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421"
985+"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1"
986+"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba"
987+"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915"
988+"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
989+"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1"
990+"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
991+"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0"
992+"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
993+"checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929"
994+"checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473"
995+"checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356"
996+"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
997+"checksum redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)" = "d32b3053e5ced86e4bc0411fec997389532bf56b000e66cb4884eeeb41413d69"
998+"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
999+"checksum regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "559008764a17de49a3146b234641644ed37d118d1ef641a0bb573d146edc6ce0"
1000+"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96"
1001+"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619"
1002+"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7"
1003+"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267"
10031004"checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
1004−"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
1005−"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
1006−"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
1007−"checksum serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3"
1008−"checksum serde_cbor 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1e18acfa2f90e8b735b2836ab8d538de304cbb6729a7360729ea5a895d15a622"
1009−"checksum serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e"
1010−"checksum serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)" = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c"
1011−"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
1005+"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
1006+"checksum serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd"
1007+"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79"
1008+"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d"
10121009"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3"
1013−"checksum syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd"
1014−"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
1015−"checksum tinytemplate 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f"
1016−"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
1017−"checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20"
1018−"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
1010+"checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2"
1011+"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
1012+"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f"
1013+"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
1014+"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6"
1015+"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
1016+"checksum tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7655088894274afb52b807bd3c87072daa1fedd155068b8705cabfd628956115"
1017+"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86"
1018+"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1"
1019+"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
1020+"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
1021+"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
10191022"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
1020−"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
1021−"checksum wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "29ae32af33bacd663a9a28241abecf01f2be64e6a185c6139b04f18b6385c5f2"
1022−"checksum wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "1845584bd3593442dc0de6e6d9f84454a59a057722f36f005e44665d6ab19d85"
1023−"checksum wasm-bindgen-futures 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1458706aa1b8fe6898d19433c9f110d93a05d1f22ae6adf55810409a94df34b4"
1024−"checksum wasm-bindgen-macro 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "87fcc747e6b73c93d22c947a6334644d22cfec5abd8b66238484dc2b0aeb9fe4"
1025−"checksum wasm-bindgen-macro-support 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "3dc4b3f2c4078c8c4a5f363b92fcf62604c5913cbd16c6ff5aaf0f74ec03f570"
1026−"checksum wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ca0b78d6d3be8589b95d1d49cdc0794728ca734adf36d7c9f07e6459508bb53d"
1027−"checksum wasm-bindgen-test 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ed5833682054e941db0b7e2b4877b61bbaafd680608e40d268e070d34558b305"
1028−"checksum wasm-bindgen-test-macro 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9c5dcf70d21d0ff0ea5cdb97dba9a9b56ddad4a9bd10c8912eedc55618be022f"
1029−"checksum wasm-bindgen-webidl 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "3126356474ceb717c8fb5549ae387c9fbf4872818454f4d87708bee997214bb5"
1030−"checksum web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)" = "98405c0a2e722ed3db341b4c5b70eb9fe0021621f7350bab76df93b09b649bbf"
1031−"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164"
1032−"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
1023+"checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1"
1024+"checksum wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ffde3534e5fa6fd936e3260cd62cd644b8656320e369388f9303c955895e35d4"
1025+"checksum wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "40c0543374a7ae881cdc5d32d19de28d1d1929e92263ffa7e31712cc2d53f9f1"
1026+"checksum wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "0ad171fc1f6e43f97d155d27f4ee5657bd8aa5cce7c497ef3a0a0c5b44618b2d"
1027+"checksum wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "f914c94c2c5f4c9364510ca2429e59c92157ec89429243bcc245e983db990a71"
1028+"checksum wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "9168c413491e4233db7b6884f09a43beb00c14d11d947ffd165242daa48a2385"
1029+"checksum wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "326c32126e1a157b6ced7400061a84ac5b11182b2cda6edad7314eb3ae9ac9fe"
1030+"checksum wasm-bindgen-test 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "8aed4ef1aa56f2ef4aff593c516de6a3e48711c703b3f7415c9151a7c9babd17"
1031+"checksum wasm-bindgen-test-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eb477c50f3c9a9ecd99c78fb9bd3b6599d414b918d5f72165b12c53738011ae1"
1032+"checksum wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "613dbf4d7d3bf10aeb212b35de14a8ef07222c26526d4f931061a83fc9e2a851"
1033+"checksum web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "24129e4be2281109b3e15a328d3d7f233ee232a5405f75ba1e9bb59a25ebc4d4"
1034+"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044"
1035+"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
10331036"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
10341037"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9"
10351038"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1039+"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba"
Cargo.toml+16−16
@@ -8,7 +8,7 @@ license = "MPL-2.0"
88name = "dodrio"
99readme = "./README.md"
1010repository = "https://github.com/fitzgen/dodrio"
11−version = "0.2.0"
11+version = "0.1.0"
1212
1313[badges]
1414travis-ci = { repository = "fitzgen/dodrio" }
@@ -42,18 +42,19 @@ xxx-unstable-strace = []
4242xxx-unstable-internal-use-only = []
4343
4444[dependencies]
45−bumpalo = "2.6.0"
46−cfg-if = "0.1.10"
45+bumpalo = "2.4.2"
46+cfg-if = "0.1.9"
47+futures = "0.1.27"
48+wasm-bindgen = "0.2.42"
49+wasm-bindgen-futures = "0.3.19"
50+js-sys = "0.3.19"
4751fxhash = "0.2.1"
48−js-sys = "0.3.32"
49−log = { version = "0.4.11", optional = true }
52+log = { version = "0.4.6", optional = true }
53+bitflags = "1.0.5"
5054longest-increasing-subsequence = "0.1.0"
51−serde = { version = "1.0.114", optional = true }
52−wasm-bindgen = "0.2.55"
53−wasm-bindgen-futures = "0.4.5"
5455
5556[dependencies.web-sys]
56−version = "0.3.32"
57+version = "0.3.19"
5758features = [
5859 "console",
5960 "Document",
@@ -64,14 +65,13 @@ features = [
6465]
6566
6667[dev-dependencies]
67−console_log = "0.2.0"
68−dodrio-js-api = { version = "=0.2.0", path = "./crates/js-api" }
69−futures = "0.3.5"
70−log = "0.4.11"
71−wasm-bindgen-test = "0.3.5"
68+console_log = "0.1.2"
69+dodrio-js-api = { version = "=0.1.0", path = "./crates/js-api" }
70+log = "0.4.6"
71+wasm-bindgen-test = "0.2.42"
7272
7373[dev-dependencies.web-sys]
74−version = "0.3.32"
74+version = "0.3.19"
7575features = [
7676 "Attr",
7777 "EventTarget",
@@ -81,7 +81,7 @@ features = [
8181]
8282
8383[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
84−criterion = "0.3.3"
84+criterion = "0.2.11"
8585
8686[profile.bench]
8787debug = true
README.md−9
@@ -57,15 +57,6 @@ directory](https://github.com/fitzgen/dodrio/tree/master/examples), including:
5757* [`js-component`](https://github.com/fitzgen/dodrio/tree/master/examples/js-component):
5858 Defines a rendering component in JavaScript with the `dodrio-js-api` crate.
5959
60−## Cargo Features
61−
62−* `log` — enable debugging-oriented log messages with the `log` crate's
63− facade. You still have to initialize a logger for the messages to go anywhere,
64− such as [`console_log`](https://github.com/iamcodemaker/console_log).
65−
66−* `serde` — enable `serde::{Serialize, Deserialize}` implementations for
67− `Cached<R>` where `R` is serializable and deserializable.
68−
6960## Design
7061
7162### Bump Allocation
benches/benches.rs+22−9
@@ -13,20 +13,19 @@ use dodrio::{
1313 CachedSet, Node, Render, RenderContext, Vdom,
1414};
1515use std::cell::RefCell;
16−use std::convert::TryInto;
1716
1817/// The simplest thing we can render: `<div/>`.
1918struct Empty;
20−impl<'a> Render<'a> for Empty {
21− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
19+impl Render for Empty {
20+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
2221 div(&cx).finish()
2322 }
2423}
2524
2625/// Render a list that is `self.0` items long, has attributes and listeners.
2726struct SimpleList(usize);
28−impl<'a> Render<'a> for SimpleList {
29− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
27+impl Render for SimpleList {
28+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
3029 let mut children = bumpalo::collections::Vec::with_capacity_in(self.0, cx.bump);
3130 children.extend((0..self.0).map(|_| {
3231 li(&cx)
@@ -74,9 +73,16 @@ fn criterion_benchmark(c: &mut Criterion) {
7473 })
7574 }
7675 },
77− vec![100, 1_000, 10_000],
76+ vec![
77+ // TODO: Only test one `n` value until
78+ // https://github.com/bheisler/criterion.rs/issues/269 is fixed.
79+ //
80+ // 100,
81+ // 1_000,
82+ 10_000,
83+ ],
7884 )
79− .throughput(|n| Throughput::Elements((*n).try_into().unwrap())),
85+ .throughput(|n| Throughput::Elements(*n as u32)),
8086 );
8187
8288 c.bench(
@@ -90,7 +96,14 @@ fn criterion_benchmark(c: &mut Criterion) {
9096 black_box(&vdom);
9197 })
9298 },
93− vec![100, 1_000, 10_000],
99+ vec![
100+ // TODO: Only test one `n` value until
101+ // https://github.com/bheisler/criterion.rs/issues/269 is fixed.
102+ //
103+ // 100,
104+ // 1_000,
105+ 10_000,
106+ ],
94107 )
95108 .with_function("empty-to-full-list-to-empty", |b, &n| {
96109 b.iter(|| {
@@ -110,7 +123,7 @@ fn criterion_benchmark(c: &mut Criterion) {
110123 black_box(&vdom);
111124 })
112125 })
113− .throughput(|n| Throughput::Elements((*n).try_into().unwrap())),
126+ .throughput(|n| Throughput::Elements(*n as u32)),
114127 );
115128}
116129
crates/js-api/Cargo.toml+7−6
@@ -7,16 +7,17 @@ keywords = ["javascript", "js", "vdom", "virtual-dom"]
77license = "MPL-2.0"
88name = "dodrio-js-api"
99repository = "https://github.com/fitzgen/dodrio"
10−version = "0.2.0"
10+version = "0.1.0"
1111
1212[badges]
1313travis-ci = { repository = "fitzgen/dodrio" }
1414
1515[dependencies]
16−dodrio = { version = "=0.2.0", path = "../.." }
17−wasm-bindgen = "0.2.55"
18−js-sys = "0.3.32"
19−wasm-bindgen-futures = "0.4.5"
16+dodrio = { version = "=0.1.0", path = "../.." }
17+wasm-bindgen = "0.2.42"
18+js-sys = "0.3.19"
19+wasm-bindgen-futures = "0.3.19"
20+futures = "0.1.27"
2021
2122[dev-dependencies]
22−wasm-bindgen-test = "0.3.5"
23+wasm-bindgen-test = "0.2.42"
crates/js-api/src/lib.rs+10−13
@@ -99,8 +99,8 @@ impl GreetingViaJs {
9999
100100/// And finally the `Render` implementation! This adds a `<p>` element and some
101101/// text around whatever the inner JS `Greeting` component renders.
102−impl<'a> Render<'a> for GreetingViaJs {
103− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
102+impl Render for GreetingViaJs {
103+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
104104 use dodrio::builder::*;
105105 p(&cx)
106106 .children([
@@ -116,6 +116,7 @@ impl<'a> Render<'a> for GreetingViaJs {
116116#![deny(missing_docs, missing_debug_implementations)]
117117
118118use dodrio::{builder, bumpalo, Node, Render, RenderContext};
119+use futures::prelude::*;
119120use js_sys::{Object, Promise, Reflect};
120121use wasm_bindgen::prelude::*;
121122use wasm_bindgen::JsCast;
@@ -184,16 +185,12 @@ impl VdomWeak {
184185 /// Schedule re-rendering of the virtual DOM. A promise is returned that is
185186 /// resolved after the rendering has happened.
186187 pub fn render(&self) -> Promise {
187− let future = self.inner.render();
188−
189− wasm_bindgen_futures::future_to_promise(async move {
190− if let Err(e) = future.await {
188+ wasm_bindgen_futures::future_to_promise(
189+ self.inner.render().map(|_| JsValue::null()).map_err(|e| {
191190 let msg = e.to_string();
192− Err(js_sys::Error::new(&msg).into())
193− } else {
194− Ok(JsValue::null())
195− }
196− })
191+ js_sys::Error::new(&msg).into()
192+ }),
193+ )
197194 }
198195}
199196
@@ -216,8 +213,8 @@ impl JsRender {
216213 }
217214}
218215
219−impl<'a> Render<'a> for JsRender {
220− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
216+impl Render for JsRender {
217+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
221218 create(cx, self.render())
222219 }
223220}
examples/counter/Cargo.toml+5−5
@@ -11,13 +11,13 @@ crate-type = ["cdylib"]
1111
1212[dependencies]
1313console_error_panic_hook = "0.1.6"
14−console_log = "0.2.0"
14+console_log = "0.1.2"
1515dodrio = { path = "../.." }
16−log = "0.4.11"
17−wasm-bindgen = "0.2.55"
16+log = "0.4.6"
17+wasm-bindgen = "0.2.42"
1818
1919[dependencies.web-sys]
20−version = "0.3.32"
20+version = "0.3.19"
2121features = [
2222 "console",
2323 "Document",
@@ -30,4 +30,4 @@ features = [
3030]
3131
3232[dev-dependencies]
33−wasm-bindgen-test = "0.3.5"
33+wasm-bindgen-test = "0.2.42"
examples/counter/src/lib.rs+2−2
@@ -26,8 +26,8 @@ impl Counter {
2626
2727// The `Render` implementation for `Counter`s displays the current count and has
2828// buttons to increment and decrement the count.
29−impl<'a> Render<'a> for Counter {
30− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
29+impl Render for Counter {
30+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
3131 use dodrio::builder::*;
3232
3333 // Stringify the count as a bump-allocated string.
examples/game-of-life/Cargo.toml+6−5
@@ -11,13 +11,14 @@ crate-type = ["cdylib"]
1111
1212[dependencies]
1313dodrio = { path = "../.." }
14−wasm-bindgen = "0.2.55"
14+wasm-bindgen = "0.2.42"
1515console_error_panic_hook = "0.1.6"
16−js-sys = "0.3.32"
17−wasm-bindgen-futures = "0.4.5"
16+js-sys = "0.3.19"
17+wasm-bindgen-futures = "0.3.19"
18+futures = "0.1.27"
1819
1920[dependencies.web-sys]
20−version = "0.3.32"
21+version = "0.3.19"
2122features = [
2223 "Document",
2324 "HtmlElement",
@@ -26,4 +27,4 @@ features = [
2627]
2728
2829[dev-dependencies]
29−wasm-bindgen-test = "0.3.5"
30+wasm-bindgen-test = "0.2.42"
examples/game-of-life/src/lib.rs+12−17
@@ -1,4 +1,5 @@
11use dodrio::{bumpalo, Node, Render, RenderContext, Vdom};
2+use futures::prelude::*;
23use std::cell::RefCell;
34use std::rc::Rc;
45use wasm_bindgen::{prelude::*, JsCast};
@@ -126,8 +127,8 @@ impl Universe {
126127}
127128
128129/// The rendering implementation for our Game of Life.
129−impl<'a> Render<'a> for Universe {
130− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
130+impl Render for Universe {
131+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
131132 use dodrio::builder::*;
132133
133134 let mut rows = bumpalo::collections::Vec::with_capacity_in(self.height as usize, cx.bump);
@@ -177,26 +178,20 @@ pub fn run() {
177178
178179 // Kick off a loop that keeps computing a tick of the universe and then
179180 // re-rendering on every animation frame.
180− let rc = <Rc<RefCell<Option<Closure<dyn FnMut()>>>>>::default();
181+ let rc: Rc<RefCell<Option<Closure<FnMut()>>>> = Rc::new(RefCell::new(None));
181182 let rc2 = rc.clone();
182183 let window2 = window.clone();
183184 let weak = vdom.weak();
184185 let f = Closure::wrap(Box::new(move || {
185186 weak.schedule_render();
186187
187− wasm_bindgen_futures::spawn_local({
188− let weak = weak.clone();
189− async move {
190− let fut = weak.with_component(|root| {
191− let universe = root.unwrap_mut::<Universe>();
192− universe.tick();
193− });
194−
195− if fut.await.is_err() {
196− wasm_bindgen::throw_str("impossible, we always keep the vdom alive");
197− }
198− }
199− });
188+ wasm_bindgen_futures::spawn_local(
189+ weak.with_component(|root| {
190+ let universe = root.unwrap_mut::<Universe>();
191+ universe.tick();
192+ })
193+ .map_err(|_| wasm_bindgen::throw_str("impossible, we always keep the vdom alive")),
194+ );
200195
201196 window
202197 .request_animation_frame(
@@ -207,7 +202,7 @@ pub fn run() {
207202 .unchecked_ref::<js_sys::Function>(),
208203 )
209204 .unwrap_throw();
210− }) as Box<dyn FnMut()>);
205+ }) as Box<FnMut()>);
211206 window2
212207 .request_animation_frame(f.as_ref().unchecked_ref::<js_sys::Function>())
213208 .unwrap_throw();
examples/hello-world/Cargo.toml+3−3
@@ -11,11 +11,11 @@ crate-type = ["cdylib"]
1111
1212[dependencies]
1313dodrio = { path = "../.." }
14−wasm-bindgen = "0.2.55"
14+wasm-bindgen = "0.2.42"
1515console_error_panic_hook = "0.1.6"
1616
1717[dependencies.web-sys]
18−version = "0.3.32"
18+version = "0.3.19"
1919features = [
2020 "Document",
2121 "HtmlElement",
@@ -24,4 +24,4 @@ features = [
2424]
2525
2626[dev-dependencies]
27−wasm-bindgen-test = "0.3.5"
27+wasm-bindgen-test = "0.2.42"
examples/hello-world/src/lib.rs+2−2
@@ -10,8 +10,8 @@ struct Hello {
1010
1111// The `Render` implementation describes how to render a `Hello` component into
1212// HTML.
13−impl<'a> Render<'a> for Hello {
14− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
13+impl Render for Hello {
14+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
1515 let msg = bumpalo::format!(in cx.bump, "Hello, {}!", self.who);
1616 let msg = msg.into_bump_str();
1717 p(&cx).children([text(msg)]).finish()
examples/input-form/Cargo.toml+3−3
@@ -11,11 +11,11 @@ crate-type = ["cdylib"]
1111
1212[dependencies]
1313dodrio = { path = "../.." }
14−wasm-bindgen = "0.2.55"
14+wasm-bindgen = "0.2.42"
1515console_error_panic_hook = "0.1.6"
1616
1717[dependencies.web-sys]
18−version = "0.3.32"
18+version = "0.3.19"
1919features = [
2020 "console",
2121 "Document",
@@ -29,4 +29,4 @@ features = [
2929]
3030
3131[dev-dependencies]
32−wasm-bindgen-test = "0.3.5"
32+wasm-bindgen-test = "0.2.42"
examples/input-form/src/lib.rs+2−2
@@ -23,8 +23,8 @@ impl SayHelloTo {
2323
2424// The `Render` implementation has a text `<input>` and a `<div>` that shows a
2525// greeting to the `<input>`'s value.
26−impl<'a> Render<'a> for SayHelloTo {
27− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
26+impl Render for SayHelloTo {
27+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
2828 use dodrio::builder::*;
2929
3030 div(&cx)
examples/js-component/Cargo.toml+3−3
@@ -12,12 +12,12 @@ crate-type = ["cdylib"]
1212[dependencies]
1313dodrio = { path = "../.." }
1414dodrio-js-api = { path = "../../crates/js-api" }
15−wasm-bindgen = "0.2.55"
15+wasm-bindgen = "0.2.42"
1616console_error_panic_hook = "0.1.6"
17−js-sys = "0.3.32"
17+js-sys = "0.3.19"
1818
1919[dependencies.web-sys]
20−version = "0.3.32"
20+version = "0.3.19"
2121features = [
2222 "Document",
2323 "HtmlElement",
examples/js-component/src/lib.rs+2−2
@@ -31,8 +31,8 @@ impl GreetingViaJs {
3131
3232/// Here's the `Render` implementation! This adds a `<p>` element and some text
3333/// around whatever the inner JS `Greeting` component renders.
34−impl<'a> Render<'a> for GreetingViaJs {
35− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
34+impl Render for GreetingViaJs {
35+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
3636 use dodrio::builder::*;
3737 p(&cx)
3838 .children([text("JavaScript says: "), self.js.render(cx)])
examples/moire/Cargo.toml+9−8
@@ -8,19 +8,20 @@ edition = "2018"
88crate-type = ["cdylib"]
99
1010[dependencies]
11−cfg-if = "0.1.10"
11+cfg-if = "0.1.9"
1212dodrio = { path = "../.." }
13−log = "0.4.11"
14−wasm-bindgen = "0.2.55"
15−wasm-bindgen-futures = "0.4.5"
13+futures = "0.1.27"
14+log = "0.4.6"
15+wasm-bindgen = "0.2.42"
16+wasm-bindgen-futures = "0.3.19"
1617
1718# Optional dependencies for logging.
1819console_error_panic_hook = { optional = true, version = "0.1.6" }
19−console_log = { optional = true, version = "0.2.0" }
20−js-sys = "0.3.32"
20+console_log = { optional = true, version = "0.1.2" }
21+js-sys = "0.3.19"
2122
2223[dependencies.web-sys]
23−version = "0.3.32"
24+version = "0.3.19"
2425features = [
2526 "Document",
2627 "Element",
@@ -34,7 +35,7 @@ features = [
3435]
3536
3637[dev-dependencies]
37−wasm-bindgen-test = "0.3.5"
38+wasm-bindgen-test = "0.2.42"
3839
3940[features]
4041logging = [
examples/moire/src/lib.rs+4−4
@@ -27,7 +27,7 @@ pub fn run() {
2727 let vdom = Vdom::new(&scene, component);
2828
2929 // Kick off a loop that keeps re-rendering on every animation frame.
30− let rc = <Rc<RefCell<Option<Closure<dyn FnMut()>>>>>::default();
30+ let rc: Rc<RefCell<Option<Closure<FnMut()>>>> = Rc::new(RefCell::new(None));
3131 let rc2 = rc.clone();
3232 let window2 = window.clone();
3333 let weak = vdom.weak();
@@ -42,7 +42,7 @@ pub fn run() {
4242 .unchecked_ref::<js_sys::Function>(),
4343 )
4444 .unwrap_throw();
45− }) as Box<dyn FnMut()>);
45+ }) as Box<FnMut()>);
4646 window2
4747 .request_animation_frame(f.as_ref().unchecked_ref::<js_sys::Function>())
4848 .unwrap_throw();
@@ -104,8 +104,8 @@ impl Moire {
104104 }
105105}
106106
107−impl<'a> Render<'a> for Moire {
108− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
107+impl Render for Moire {
108+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
109109 use dodrio::builder::*;
110110
111111 let elapsed = web_sys::window()
examples/sierpinski-triangle/Cargo.toml+6−5
@@ -9,13 +9,14 @@ crate-type = ["cdylib"]
99
1010[dependencies]
1111dodrio = { path = "../.." }
12−wasm-bindgen = "0.2.55"
12+wasm-bindgen = "0.2.42"
1313console_error_panic_hook = "0.1.6"
14−js-sys = "0.3.32"
15−wasm-bindgen-futures = "0.4.5"
14+js-sys = "0.3.19"
15+wasm-bindgen-futures = "0.3.19"
16+futures = "0.1.27"
1617
1718[dependencies.web-sys]
18−version = "0.3.32"
19+version = "0.3.19"
1920features = [
2021 "Document",
2122 "HtmlElement",
@@ -25,4 +26,4 @@ features = [
2526]
2627
2728[dev-dependencies]
28−wasm-bindgen-test = "0.3.5"
29+wasm-bindgen-test = "0.2.42"
examples/sierpinski-triangle/src/lib.rs+4−4
@@ -85,8 +85,8 @@ impl Container {
8585 }
8686}
8787
88−impl<'a> Render<'a> for Container {
89− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
88+impl Render for Container {
89+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
9090 use dodrio::builder::div;
9191
9292 let elapsed = web_sys::window()
@@ -111,7 +111,7 @@ impl<'a> Render<'a> for Container {
111111
112112// Kick off a loop that keeps re-rendering on every animation frame.
113113fn animate(window: Window, vdom: Vdom) {
114− let rc = <Rc<RefCell<Option<Closure<dyn FnMut()>>>>>::default();
114+ let rc: Rc<RefCell<Option<Closure<FnMut()>>>> = Rc::new(RefCell::new(None));
115115 let rc2 = rc.clone();
116116 let window2 = window.clone();
117117 let weak = vdom.weak();
@@ -126,7 +126,7 @@ fn animate(window: Window, vdom: Vdom) {
126126 .unchecked_ref::<js_sys::Function>(),
127127 )
128128 .unwrap_throw();
129− }) as Box<dyn FnMut()>);
129+ }) as Box<FnMut()>);
130130 window2
131131 .request_animation_frame(f.as_ref().unchecked_ref::<js_sys::Function>())
132132 .unwrap_throw();
examples/todomvc/Cargo.toml+12−11
@@ -5,21 +5,22 @@ name = "dodrio-todomvc"
55version = "0.1.0"
66
77[dependencies]
8−cfg-if = "0.1.10"
9−dodrio = { path = "../..", features = ["serde"] }
10−js-sys = "0.3.32"
11−serde = { features = ["derive"], version = "1.0.114" }
12−serde_json = "1.0.57"
13−wasm-bindgen = "0.2.55"
14−wasm-bindgen-futures = "0.4.5"
8+cfg-if = "0.1.9"
9+dodrio = { path = "../.." }
10+futures = "0.1.27"
11+js-sys = "0.3.19"
12+serde = { features = ["derive"], version = "1.0.91" }
13+serde_json = "1.0.39"
14+wasm-bindgen = "0.2.42"
15+wasm-bindgen-futures = "0.3.19"
1516
1617# Optional dependencies for logging.
1718console_error_panic_hook = { optional = true, version = "0.1.6" }
18−console_log = { optional = true, version = "0.2.0" }
19−log = { optional = true, version = "0.4.11" }
19+console_log = { optional = true, version = "0.1.2" }
20+log = { optional = true, version = "0.4.6" }
2021
2122[dependencies.web-sys]
22−version = "0.3.32"
23+version = "0.3.19"
2324features = [
2425 "Document",
2526 "Event",
@@ -34,7 +35,7 @@ features = [
3435]
3536
3637[dev-dependencies]
37−wasm-bindgen-test = "0.3.5"
38+wasm-bindgen-test = "0.2.42"
3839
3940[features]
4041logging = [
examples/todomvc/src/router.rs+19−22
@@ -4,6 +4,7 @@ use crate::todos::Todos;
44use crate::utils;
55use crate::visibility::Visibility;
66use dodrio::VdomWeak;
7+use futures::prelude::*;
78use std::str::FromStr;
89use wasm_bindgen::{prelude::*, JsCast};
910
@@ -28,27 +29,23 @@ pub fn start(vdom: VdomWeak) {
2829 v
2930 });
3031
31− wasm_bindgen_futures::spawn_local({
32− let vdom = vdom.clone();
33− async move {
34− let _ = vdom
35− .with_component({
36− let vdom = vdom.clone();
37− move |root| {
38− let todos = root.unwrap_mut::<Todos>();
39− // If the todos' visibility already matches the event's
40− // visibility, then there is nothing to do (ha). If they
41− // don't match, then we need to update the todos' visibility
42− // and re-render.
43− if todos.visibility() != new_vis {
44− todos.set_visibility(new_vis);
45− vdom.schedule_render();
46− }
47− }
48− })
49− .await;
50− }
51− });
32+ wasm_bindgen_futures::spawn_local(
33+ vdom.with_component({
34+ let vdom = vdom.clone();
35+ move |root| {
36+ let todos = root.unwrap_mut::<Todos>();
37+ // If the todos' visibility already matches the event's
38+ // visibility, then there is nothing to do (ha). If they
39+ // don't match, then we need to update the todos' visibility
40+ // and re-render.
41+ if todos.visibility() != new_vis {
42+ todos.set_visibility(new_vis);
43+ vdom.schedule_render();
44+ }
45+ }
46+ })
47+ .map_err(|_| ()),
48+ );
5249 };
5350
5451 // Call it once to handle the initial `#` fragment.
@@ -59,7 +56,7 @@ pub fn start(vdom: VdomWeak) {
5956 // Note that if we ever intended to unmount our todos app, we would want to
6057 // provide a method for removing this router's event listener and cleaning
6158 // up after ourselves.
62− let on_hash_change = Closure::wrap(Box::new(on_hash_change) as Box<dyn FnMut()>);
59+ let on_hash_change = Closure::wrap(Box::new(on_hash_change) as Box<FnMut()>);
6360 let window = utils::window();
6461 window
6562 .add_event_listener_with_callback("hashchange", on_hash_change.as_ref().unchecked_ref())
examples/todomvc/src/todo.rs+21−77
@@ -1,19 +1,14 @@
11//! Type definition and `dodrio::Render` implementation for a single todo item.
22
33use crate::keys;
4−use dodrio::{Cached, Node, Render, RenderContext, RootRender, VdomWeak};
4+use dodrio::{Node, Render, RenderContext, RootRender, VdomWeak};
55use serde::{Deserialize, Serialize};
66use std::marker::PhantomData;
77use wasm_bindgen::{prelude::*, JsCast};
88
99/// A single todo item.
10−#[derive(Default)]
11−pub struct Todo<C> {
12− inner: Cached<TodoInner<C>>,
13−}
14−
1510#[derive(Serialize, Deserialize)]
16−struct TodoInner<C> {
11+pub struct Todo<C> {
1712 id: usize,
1813 title: String,
1914 completed: bool,
@@ -53,87 +48,68 @@ impl<C> Todo<C> {
5348 let completed = false;
5449 let edits = None;
5550 Todo {
56− inner: Cached::new(TodoInner {
57− id,
58− title,
59− completed,
60− edits,
61− _controller: PhantomData,
62− }),
51+ id,
52+ title,
53+ completed,
54+ edits,
55+ _controller: PhantomData,
6356 }
6457 }
6558
6659 /// Set this todo item's id.
6760 pub fn set_id(&mut self, id: usize) {
68− if id != self.inner.id {
69− Cached::invalidate(&self.inner);
70− }
71− self.inner.id = id;
61+ self.id = id;
7262 }
7363
7464 /// Is this `Todo` complete?
7565 pub fn is_complete(&self) -> bool {
76− self.inner.completed
66+ self.completed
7767 }
7868
7969 /// Mark the `Todo` as complete or not.
8070 pub fn set_complete(&mut self, to: bool) {
81− if to != self.inner.completed {
82− Cached::invalidate(&self.inner);
83− }
84− self.inner.completed = to;
71+ self.completed = to;
8572 }
8673
8774 /// Get this todo's title.
8875 pub fn title(&self) -> &str {
89− &self.inner.title
76+ &self.title
9077 }
9178
9279 /// Set this todo item's title.
9380 pub fn set_title<S: Into<String>>(&mut self, title: S) {
94− let title = title.into();
95− if title != self.inner.title {
96− Cached::invalidate(&self.inner);
97− }
98− self.inner.title = title;
81+ self.title = title.into();
9982 }
10083
10184 /// Set the edits for this todo.
10285 pub fn set_edits<S: Into<String>>(&mut self, edits: Option<S>) {
103− let edits = edits.map(Into::into);
104− if edits != self.inner.edits {
105− Cached::invalidate(&self.inner);
106− }
107− self.inner.edits = edits;
86+ self.edits = edits.map(Into::into);
10887 }
10988
11089 /// Take this todo's edits, leaving `None` in their place.
11190 pub fn take_edits(&mut self) -> Option<String> {
112− if self.inner.edits.is_some() {
113− Cached::invalidate(&self.inner);
114− }
115− self.inner.edits.take()
91+ self.edits.take()
11692 }
11793}
11894
119−impl<'a, C: TodoActions> Render<'a> for Todo<C> {
120− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
95+impl<C: TodoActions> Render for Todo<C> {
96+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
12197 use dodrio::{
12298 builder::*,
12399 bumpalo::{self, collections::String},
124100 };
125101
126− let id = self.inner.id;
127− let title = self.inner.edits.as_ref().unwrap_or(&self.inner.title);
102+ let id = self.id;
103+ let title = self.edits.as_ref().unwrap_or(&self.title);
128104 let title = bumpalo::format!(in cx.bump, "{}", title).into_bump_str();
129105
130106 li(&cx)
131107 .attr("class", {
132108 let mut class = String::new_in(cx.bump);
133− if self.inner.completed {
109+ if self.completed {
134110 class.push_str("completed ");
135111 }
136− if self.inner.edits.is_some() {
112+ if self.edits.is_some() {
137113 class.push_str("editing");
138114 }
139115 class.into_bump_str()
@@ -145,7 +121,7 @@ impl<'a, C: TodoActions> Render<'a> for Todo<C> {
145121 input(&cx)
146122 .attr("class", "toggle")
147123 .attr("type", "checkbox")
148− .bool_attr("checked", self.inner.completed)
124+ .bool_attr("checked", self.completed)
149125 .on("click", move |root, vdom, _event| {
150126 C::toggle_completed(root, vdom, id);
151127 })
@@ -195,35 +171,3 @@ impl<'a, C: TodoActions> Render<'a> for Todo<C> {
195171 .finish()
196172 }
197173}
198−
199−impl<C> Default for TodoInner<C> {
200− fn default() -> Self {
201− TodoInner {
202− id: Default::default(),
203− title: Default::default(),
204− completed: Default::default(),
205− edits: Default::default(),
206− _controller: PhantomData,
207− }
208− }
209−}
210−
211−impl<C> serde::Serialize for Todo<C> {
212− fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
213− where
214− S: serde::Serializer,
215− {
216− self.inner.serialize(serializer)
217− }
218−}
219−
220−impl<'de, C> Deserialize<'de> for Todo<C> {
221− fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
222− where
223− D: serde::Deserializer<'de>,
224− {
225− Ok(Todo {
226− inner: <Cached<TodoInner<C>>>::deserialize(deserializer)?,
227− })
228− }
229−}
examples/todomvc/src/todos.rs+3−3
@@ -28,7 +28,7 @@ pub struct Todos<C = Controller> {
2828}
2929
3030/// Actions for `Todos` that can be triggered by UI interactions.
31−pub trait TodosActions: 'static + TodoActions {
31+pub trait TodosActions: TodoActions {
3232 /// Toggle the completion state of all todo items.
3333 fn toggle_all(root: &mut dyn RootRender, vdom: VdomWeak);
3434
@@ -289,8 +289,8 @@ impl<C: TodosActions> Todos<C> {
289289 }
290290}
291291
292−impl<'a, C: TodosActions> Render<'a> for Todos<C> {
293− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
292+impl<C: TodosActions> Render for Todos<C> {
293+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
294294 use dodrio::builder::*;
295295
296296 div(&cx)
src/cached.rs+7−39
@@ -9,12 +9,6 @@ use std::ops::{Deref, DerefMut};
99
1010/// A renderable that supports caching for when rendering is expensive but can
1111/// generate the same DOM tree.
12−///
13−/// # Example
14−///
15−/// The [TodoMVC
16−/// example](https://github.com/fitzgen/dodrio/blob/master/examples/todomvc/src/todo.rs)
17−/// caches individual todo items.
1812#[derive(Clone, Debug, Default)]
1913pub struct Cached<R>
2014where
@@ -45,8 +39,8 @@ where
4539 /// count: u32,
4640 /// }
4741 ///
48− /// impl<'a> Render<'a> for Counter {
49− /// fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
42+ /// impl Render for Counter {
43+ /// fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
5044 /// // ...
5145 /// # unimplemented!()
5246 /// }
@@ -85,8 +79,8 @@ where
8579 /// who: String
8680 /// }
8781 ///
88− /// impl<'a> Render<'a> for Hello {
89− /// fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
82+ /// impl Render for Hello {
83+ /// fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
9084 /// use dodrio::builder::*;
9185 /// let greeting = bumpalo::format!(in cx.bump, "Hello, {}!", self.who);
9286 /// p(&cx)
@@ -143,11 +137,11 @@ where
143137 }
144138}
145139
146−impl<'a, R> Render<'a> for Cached<R>
140+impl<R> Render for Cached<R>
147141where
148− R: 'static + Default + for<'b> Render<'b>,
142+ R: 'static + Default + Render,
149143{
150− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
144+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
151145 let template = cx.template::<R>();
152146 let cached = match self.cached.get() {
153147 // This does-the-cache-contain-this-id check is necessary because
@@ -201,29 +195,3 @@ where
201195 cached.into()
202196 }
203197}
204−
205−#[cfg(feature = "serde")]
206−impl<R> serde::Serialize for Cached<R>
207−where
208− R: Default + serde::Serialize,
209−{
210− fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
211− where
212− S: serde::Serializer,
213− {
214− self.inner.serialize(serializer)
215− }
216−}
217−
218−#[cfg(feature = "serde")]
219−impl<'de, R> serde::Deserialize<'de> for Cached<R>
220−where
221− R: Default + serde::Deserialize<'de>,
222−{
223− fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
224− where
225− D: serde::Deserializer<'de>,
226− {
227− R::deserialize(deserializer).map(Cached::new)
228− }
229−}
src/change_list/mod.rs+2−2
@@ -233,9 +233,9 @@ impl ChangeListBuilder<'_> {
233233 self.state.emitter.replace_with();
234234 }
235235
236− pub fn set_attribute(&mut self, name: &str, value: &str, is_namespaced: bool) {
236+ pub fn set_attribute(&mut self, name: &str, value: &str) {
237237 debug_assert!(self.traversal_is_committed());
238− if name == "class" && !is_namespaced {
238+ if name == "class" {
239239 let class_id = self.ensure_string(value);
240240 debug!("emit: set_class({:?})", value);
241241 self.state.emitter.set_class(class_id.into());
src/change_list/traversal.rs+1−1
@@ -167,7 +167,7 @@ mod tests {
167167
168168 #[test]
169169 fn test_traversal() {
170− fn t<F>(f: F) -> Box<dyn FnMut(&mut Traversal)>
170+ fn t<F>(f: F) -> Box<FnMut(&mut Traversal)>
171171 where
172172 F: 'static + FnMut(&mut Traversal),
173173 {
src/diff.rs+6−6
@@ -78,7 +78,7 @@ pub(crate) fn diff(
7878 return;
7979 }
8080 diff_listeners(change_list, registry, old_listeners, new_listeners);
81− diff_attributes(change_list, old_attributes, new_attributes, new_namespace.is_some());
81+ diff_attributes(change_list, old_attributes, new_attributes);
8282 diff_children(
8383 cached_set,
8484 change_list,
@@ -204,26 +204,26 @@ fn diff_listeners(
204204// [... node]
205205//
206206// The change list stack is left unchanged.
207−fn diff_attributes(change_list: &mut ChangeListBuilder, old: &[Attribute], new: &[Attribute], is_namespaced: bool) {
207+fn diff_attributes(change_list: &mut ChangeListBuilder, old: &[Attribute], new: &[Attribute]) {
208208 // Do O(n^2) passes to add/update and remove attributes, since
209209 // there are almost always very few attributes.
210210 'outer: for new_attr in new {
211211 if new_attr.is_volatile() {
212212 change_list.commit_traversal();
213− change_list.set_attribute(new_attr.name, new_attr.value, is_namespaced);
213+ change_list.set_attribute(new_attr.name, new_attr.value);
214214 } else {
215215 for old_attr in old {
216216 if old_attr.name == new_attr.name {
217217 if old_attr.value != new_attr.value {
218218 change_list.commit_traversal();
219− change_list.set_attribute(new_attr.name, new_attr.value, is_namespaced);
219+ change_list.set_attribute(new_attr.name, new_attr.value);
220220 }
221221 continue 'outer;
222222 }
223223 }
224224
225225 change_list.commit_traversal();
226− change_list.set_attribute(new_attr.name, new_attr.value, is_namespaced);
226+ change_list.set_attribute(new_attr.name, new_attr.value);
227227 }
228228 }
229229
@@ -953,7 +953,7 @@ fn create(
953953 }
954954
955955 for attr in attributes {
956− change_list.set_attribute(&attr.name, &attr.value, namespace.is_some());
956+ change_list.set_attribute(&attr.name, &attr.value);
957957 }
958958
959959 // Fast path: if there is a single text child, it is faster to
src/events.rs+2−2
@@ -86,7 +86,7 @@ cfg_if::cfg_if! {
8686 callback(component, vdom_weak, event);
8787 }
8888 }
89− }) as Box<dyn Fn(web_sys::Event, u32, u32)>);
89+ }) as Box<Fn(web_sys::Event, u32, u32)>);
9090
9191 (registry, closure)
9292 }
@@ -99,7 +99,7 @@ cfg_if::cfg_if! {
9999
100100 pub(crate) fn remove_subtree(&mut self, node: &Node) {
101101 match node.kind {
102− NodeKind::Cached(_) | NodeKind::Text(_) => {},
102+ NodeKind::Cached(_) | NodeKind::Text(_) => return,
103103 NodeKind::Element(&ElementNode {listeners, children, ..}) => {
104104 for l in listeners {
105105 self.remove(l);
src/lib.rs+3−3
@@ -18,8 +18,8 @@
1818//! }
1919//! }
2020//!
21−//! impl<'a, 'who> Render<'a> for Hello<'who> {
22−//! fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
21+//! impl<'who> Render for Hello<'who> {
22+//! fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
2323//! use dodrio::builder::*;
2424//!
2525//! let id = bumpalo::format!(in cx.bump, "hello-{}", self.who);
@@ -123,7 +123,7 @@ cfg_if::cfg_if! {
123123 /// An element node in the physical DOM.
124124 pub type Element = web_sys::Element;
125125
126− pub(crate) type EventsTrampoline = wasm_bindgen::closure::Closure<dyn Fn(web_sys::Event, u32, u32)>;
126+ pub(crate) type EventsTrampoline = wasm_bindgen::closure::Closure<Fn(web_sys::Event, u32, u32)>;
127127 }
128128}
129129
src/render.rs+16−43
@@ -21,8 +21,8 @@ use wasm_bindgen::UnwrapThrowExt;
2121///
2222/// pub struct MyComponent;
2323///
24−/// impl<'a> Render<'a> for MyComponent {
25−/// fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
24+/// impl Render for MyComponent {
25+/// fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
2626/// use dodrio::builder::*;
2727///
2828/// p(&cx)
@@ -35,26 +35,26 @@ use wasm_bindgen::UnwrapThrowExt;
3535/// }
3636/// }
3737/// ```
38−pub trait Render<'a> {
38+pub trait Render {
3939 /// Render `self` as a virtual DOM. Use the given context's `Bump` for
4040 /// temporary allocations.
41− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a>;
41+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a>;
4242}
4343
44−impl<'a, 'r, R> Render<'a> for &'r R
44+impl<'r, R> Render for &'r R
4545where
46− R: Render<'a>,
46+ R: Render,
4747{
48− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
48+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
4949 (**self).render(cx)
5050 }
5151}
5252
53−impl<'a, R> Render<'a> for Rc<R>
53+impl<R> Render for Rc<R>
5454where
55− R: Render<'a>,
55+ R: Render,
5656{
57− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
57+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
5858 (**self).render(cx)
5959 }
6060}
@@ -69,24 +69,24 @@ where
6969/// You do not need to implement this trait by hand: there is a blanket
7070/// implementation for all `Render` types that fulfill the `RootRender`
7171/// requirements.
72−pub trait RootRender: Any + for<'a> Render<'a> {
72+pub trait RootRender: Any + Render {
7373 /// Get this `&RootRender` trait object as an `&Any` trait object reference.
74− fn as_any(&self) -> &dyn Any;
74+ fn as_any(&self) -> &Any;
7575
7676 /// Get this `&mut RootRender` trait object as an `&mut Any` trait object
7777 /// reference.
78− fn as_any_mut(&mut self) -> &mut dyn Any;
78+ fn as_any_mut(&mut self) -> &mut Any;
7979}
8080
8181impl<T> RootRender for T
8282where
83− T: Any + for<'a> Render<'a>,
83+ T: Any + Render,
8484{
85− fn as_any(&self) -> &dyn Any {
85+ fn as_any(&self) -> &Any {
8686 self
8787 }
8888
89− fn as_any_mut(&mut self) -> &mut dyn Any {
89+ fn as_any_mut(&mut self) -> &mut Any {
9090 self
9191 }
9292}
@@ -138,31 +138,4 @@ mod tests {
138138 #[allow(dead_code)]
139139 fn takes_dyn_render(_: &dyn super::RootRender) {}
140140 }
141−
142− #[test]
143− fn render_bump_scoped_child() {
144− use crate::{builder::*, bumpalo::collections::String, Node, Render, RenderContext};
145−
146− struct Child<'a> {
147− name: &'a str,
148− }
149−
150− impl<'a> Render<'a> for Child<'a> {
151− fn render(&self, _cx: &mut RenderContext<'a>) -> Node<'a> {
152− text(self.name)
153− }
154− }
155−
156− struct Parent;
157−
158− impl<'a> Render<'a> for Parent {
159− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
160− let child_name = String::from_str_in("child", cx.bump).into_bump_str();
161−
162− div(&cx)
163− .children([Child { name: child_name }.render(cx)])
164− .finish()
165− }
166− }
167− }
168141}
src/render_context.rs+1−1
@@ -69,7 +69,7 @@ impl<'a> RenderContext<'a> {
6969 /// Get or create the cached template for `Cached<R>`.
7070 pub(crate) fn template<R>(&mut self) -> Option<CacheId>
7171 where
72− R: 'static + Default + for<'b> Render<'b>,
72+ R: 'static + Default + Render,
7373 {
7474 let template_id = Cached::<R>::template_id();
7575 if let Some(cache_id) = self.templates.get(&template_id).cloned() {
src/vdom.rs+77−82
@@ -6,11 +6,11 @@ use crate::events::EventsRegistry;
66use crate::node::{Node, NodeKey};
77use crate::RenderContext;
88use bumpalo::Bump;
9+use futures::future::Future;
910use fxhash::FxHashMap;
1011use std::cell::Cell;
1112use std::cell::RefCell;
1213use std::fmt;
13−use std::future::Future;
1414use std::mem;
1515use std::mem::ManuallyDrop;
1616use std::rc::{Rc, Weak};
@@ -55,7 +55,7 @@ pub(crate) struct VdomInnerExclusive {
5555 // Always `Some` except just before we drop. Just an option so that
5656 // `unmount` can take the component out but we can still have a Drop
5757 // implementation.
58− component: Option<Box<dyn RootRender>>,
58+ component: Option<Box<RootRender>>,
5959
6060 dom_buffers: Option<[Bump; 2]>,
6161 change_list: ManuallyDrop<ChangeListPersistentState>,
@@ -158,15 +158,12 @@ impl Vdom {
158158 where
159159 R: RootRender,
160160 {
161− Self::with_boxed_root_render(container, Box::new(component) as Box<dyn RootRender>)
161+ Self::with_boxed_root_render(container, Box::new(component) as Box<RootRender>)
162162 }
163163
164164 /// Construct a `Vdom` with the already-boxed-as-a-trait-object root
165165 /// rendering component.
166− pub fn with_boxed_root_render(
167− container: &crate::Element,
168− component: Box<dyn RootRender>,
169− ) -> Vdom {
166+ pub fn with_boxed_root_render(container: &crate::Element, component: Box<RootRender>) -> Vdom {
170167 crate::strace::init_strace();
171168
172169 let dom_buffers = [Bump::new(), Bump::new()];
@@ -220,7 +217,7 @@ impl Vdom {
220217 R: RootRender,
221218 {
222219 let mut exclusive = self.inner.exclusive.borrow_mut();
223− let component = Box::new(component) as Box<dyn RootRender>;
220+ let component = Box::new(component) as Box<RootRender>;
224221 exclusive.component = Some(component);
225222 exclusive.render();
226223 }
@@ -240,7 +237,7 @@ impl Vdom {
240237 /// Unmount this virtual DOM, unregister its event listeners, and return its
241238 /// root render component.
242239 #[inline]
243− pub fn unmount(self) -> Box<dyn RootRender> {
240+ pub fn unmount(self) -> Box<RootRender> {
244241 Rc::try_unwrap(self.inner.clone())
245242 .map_err(|_| ())
246243 .unwrap_throw()
@@ -326,7 +323,7 @@ impl VdomInnerExclusive {
326323 }
327324}
328325
329−fn request_animation_frame(f: &Closure<dyn FnMut()>) {
326+fn request_animation_frame(f: &Closure<FnMut()>) {
330327 web_sys::window()
331328 .expect_throw("should have a window")
332329 .request_animation_frame(f.as_ref().unchecked_ref())
@@ -343,7 +340,7 @@ where
343340 let f = Closure::wrap(Box::new(move || {
344341 *g.borrow_mut() = None;
345342 f();
346− }) as Box<dyn FnMut()>);
343+ }) as Box<FnMut()>);
347344 request_animation_frame(&f);
348345
349346 *h.borrow_mut() = Some(f);
@@ -374,23 +371,25 @@ impl VdomWeak {
374371 /// Replace the root rendering component with the new `root`.
375372 ///
376373 /// Returns a future that resolves to the *old* root component.
377− pub async fn set_component(
374+ pub fn set_component(
378375 self,
379376 root: Box<dyn RootRender>,
380− ) -> Result<Box<dyn RootRender + 'static>, VdomDroppedError> {
381− let inner = self.inner.upgrade().ok_or(VdomDroppedError {})?;
382−
383− // Wait for a new tick of the micro-task queue
384− let _ = JsFuture::from(js_sys::Promise::resolve(&JsValue::null())).await;
385−
386− let old = {
387− let mut exclusive = inner.exclusive.borrow_mut();
388− mem::replace(&mut *exclusive.component.as_mut().unwrap_throw(), root)
389− };
390−
391− VdomWeak::new(&inner).render().await?;
392−
393− Ok(old)
377+ ) -> impl Future<Item = Box<dyn RootRender + 'static>, Error = VdomDroppedError> {
378+ futures::future::ok(self.inner.upgrade())
379+ .and_then(|inner| inner.ok_or(()))
380+ .map_err(|_| VdomDroppedError {})
381+ .and_then(|inner| {
382+ let promise = js_sys::Promise::resolve(&JsValue::null());
383+ JsFuture::from(promise)
384+ .map_err(|_| VdomDroppedError {})
385+ .and_then(move |_| {
386+ let old = {
387+ let mut exclusive = inner.exclusive.borrow_mut();
388+ mem::replace(&mut *exclusive.component.as_mut().unwrap_throw(), root)
389+ };
390+ VdomWeak::new(&inner).render().map(|_| old)
391+ })
392+ })
394393 }
395394
396395 /// Execute `f` with a reference to this virtual DOM's root rendering
@@ -398,18 +397,24 @@ impl VdomWeak {
398397 ///
399398 /// To ensure exclusive access to the root rendering component, the
400399 /// invocation takes place on a new tick of the micro-task queue.
401− pub async fn with_component<F, T>(&self, f: F) -> Result<T, VdomDroppedError>
400+ pub fn with_component<F, T>(&self, f: F) -> impl Future<Item = T, Error = VdomDroppedError>
402401 where
403402 F: 'static + FnOnce(&mut dyn RootRender) -> T,
404403 {
405− let inner = self.inner.upgrade().ok_or(VdomDroppedError {})?;
406−
407− // Wait for a new tick of the micro-task queue
408− let _ = JsFuture::from(js_sys::Promise::resolve(&JsValue::null())).await;
409−
410− let mut exclusive = inner.exclusive.borrow_mut();
411−
412− Ok(f(exclusive.component_raw_mut()))
404+ futures::future::ok(self.inner.upgrade())
405+ .and_then(|inner| inner.ok_or(()))
406+ .map_err(|_| VdomDroppedError {})
407+ .and_then(|inner| {
408+ let mut f = Some(f);
409+ let promise = js_sys::Promise::resolve(&JsValue::null());
410+ JsFuture::from(promise)
411+ .map_err(|_| VdomDroppedError {})
412+ .map(move |_| {
413+ let f = f.take().unwrap_throw();
414+ let mut exclusive = inner.exclusive.borrow_mut();
415+ f(exclusive.component_raw_mut())
416+ })
417+ })
413418 }
414419
415420 /// Schedule a render to occur during the next animation frame.
@@ -418,12 +423,7 @@ impl VdomWeak {
418423 /// `render` instead.
419424 pub fn schedule_render(&self) {
420425 debug!("VdomWeak::schedule_render");
421−
422− let future = self.render();
423−
424− wasm_bindgen_futures::spawn_local(async move {
425− let _ = future.await;
426− });
426+ wasm_bindgen_futures::spawn_local(self.render().map_err(|_| ()));
427427 }
428428
429429 /// Schedule a render to occur during the next animation frame and return a
@@ -431,46 +431,41 @@ impl VdomWeak {
431431 ///
432432 /// If you don't want to do more things after the render completes, then use
433433 /// `schedule_render` instead of `render`.
434− pub fn render(&self) -> impl Future<Output = Result<(), VdomDroppedError>> {
435− let inner = self.inner.upgrade();
436−
437− async move {
438− let inner = inner.ok_or(VdomDroppedError {})?;
439−
440− let promise = inner.shared.render_scheduled.take().unwrap_or_else(|| {
441− js_sys::Promise::new(&mut |resolve, reject| {
442− let vdom = VdomWeak {
443− inner: Rc::downgrade(&inner),
444− };
445−
446− with_animation_frame(move || match vdom.inner.upgrade() {
447− None => {
448− warn!("VdomWeak::render: vdom unmounted before we could render");
449− let r = reject.call0(&JsValue::null());
450− debug_assert!(r.is_ok());
451− }
452− Some(inner) => {
453− let mut exclusive = inner.exclusive.borrow_mut();
454− exclusive.render();
455−
456− // We did the render, so take the promise away
457− // and let future `render` calls request new
458− // animation frames.
459− let _ = inner.shared.render_scheduled.take();
460−
461− let r = resolve.call0(&JsValue::null());
462− debug_assert!(r.is_ok());
463− }
464− });
465− })
466− });
467−
468− inner.shared.render_scheduled.set(Some(promise.clone()));
469−
470− JsFuture::from(promise)
471− .await
472− .map(drop)
473− .map_err(|_| VdomDroppedError {})
474− }
434+ pub fn render(&self) -> impl Future<Item = (), Error = VdomDroppedError> {
435+ futures::future::ok(self.inner.upgrade())
436+ .and_then(|inner| inner.ok_or(()))
437+ .map_err(|_| VdomDroppedError {})
438+ .and_then(|inner| {
439+ let promise = inner.shared.render_scheduled.take().unwrap_or_else(|| {
440+ js_sys::Promise::new(&mut |resolve, reject| {
441+ let vdom = VdomWeak {
442+ inner: Rc::downgrade(&inner),
443+ };
444+ with_animation_frame(move || match vdom.inner.upgrade() {
445+ None => {
446+ warn!("VdomWeak::render: vdom unmounted before we could render");
447+ let r = reject.call0(&JsValue::null());
448+ debug_assert!(r.is_ok());
449+ }
450+ Some(inner) => {
451+ let mut exclusive = inner.exclusive.borrow_mut();
452+ exclusive.render();
453+
454+ // We did the render, so take the promise away
455+ // and let future `render` calls request new
456+ // animation frames.
457+ let _ = inner.shared.render_scheduled.take();
458+
459+ let r = resolve.call0(&JsValue::null());
460+ debug_assert!(r.is_ok());
461+ }
462+ });
463+ })
464+ });
465+ inner.shared.render_scheduled.set(Some(promise.clone()));
466+ JsFuture::from(promise)
467+ .map(|_| ())
468+ .map_err(|_| VdomDroppedError {})
469+ })
475470 }
476471}
tests/web/cached.rs+65−73
@@ -1,5 +1,6 @@
11use super::{assert_rendered, before_after, create_element, RenderFn};
22use dodrio::{builder::*, bumpalo, Cached, Node, Render, RenderContext, RootRender, Vdom};
3+use futures::prelude::*;
34use std::cell::Cell;
45use std::rc::Rc;
56use wasm_bindgen::prelude::*;
@@ -18,8 +19,8 @@ impl CountRenders {
1819 }
1920}
2021
21−impl<'a> Render<'a> for CountRenders {
22− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
22+impl Render for CountRenders {
23+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
2324 let count = self.render_count.get() + 1;
2425 self.render_count.set(count);
2526
@@ -28,8 +29,8 @@ impl<'a> Render<'a> for CountRenders {
2829 }
2930}
3031
31−#[wasm_bindgen_test]
32−async fn uses_cached_render() {
32+#[wasm_bindgen_test(async)]
33+fn uses_cached_render() -> impl Future<Item = (), Error = JsValue> {
3334 use dodrio::builder::*;
3435
3536 let cached = Cached::new(CountRenders::new());
@@ -49,61 +50,52 @@ async fn uses_cached_render() {
4950 let vdom6 = vdom0.clone();
5051 let vdom7 = vdom0.clone();
5152
52− // We render, populate the cache, and get "1".
53− vdom0.weak().render().await.unwrap();
5453 vdom0
5554 .weak()
56− .with_component(move |comp| {
57− let comp = comp.unwrap_mut::<Cached<CountRenders>>();
58− assert_eq!(comp.render_count.get(), 1);
59− assert_rendered(&container1, &RenderFn(|_| text("1")));
55+ // We render, populate the cache, and get "1".
56+ .render()
57+ .and_then(move |_| {
58+ vdom0.weak().with_component(move |comp| {
59+ let comp = comp.unwrap_mut::<Cached<CountRenders>>();
60+ assert_eq!(comp.render_count.get(), 1);
61+ assert_rendered(&container1, &RenderFn(|_| text("1")));
62+ })
6063 })
61− .await
62− .unwrap();
63−
64− // We re-render, re-use the cached node, and get "1" again.
65− vdom1.weak().render().await.unwrap();
66− vdom2
67− .weak()
68− .with_component(move |comp| {
69− let comp = comp.unwrap_mut::<Cached<CountRenders>>();
70− assert_eq!(comp.render_count.get(), 1);
71− assert_rendered(&container2, &RenderFn(|_| text("1")));
64+ // We re-render, re-use the cached node, and get "1" again.
65+ .and_then(move |_| vdom1.weak().render())
66+ .and_then(move |_| {
67+ vdom2.weak().with_component(move |comp| {
68+ let comp = comp.unwrap_mut::<Cached<CountRenders>>();
69+ assert_eq!(comp.render_count.get(), 1);
70+ assert_rendered(&container2, &RenderFn(|_| text("1")));
71+ })
7272 })
73− .await
74− .unwrap();
75−
76− // We invalidate the cache, re-render, re-populate the cache, and should now have "2".
77− vdom3
78− .weak()
79− .with_component(move |comp| {
80− let comp = comp.unwrap_mut::<Cached<CountRenders>>();
81− Cached::invalidate(comp);
73+ // We invalidate the cache, re-render, re-populate the cache, and should
74+ // now have "2".
75+ .and_then(move |_| {
76+ vdom3.weak().with_component(move |comp| {
77+ let comp = comp.unwrap_mut::<Cached<CountRenders>>();
78+ Cached::invalidate(comp);
79+ })
8280 })
83− .await
84− .unwrap();
85− vdom4.weak().render().await.unwrap();
86− vdom5
87− .weak()
88− .with_component(move |comp| {
89− let comp = comp.unwrap_mut::<Cached<CountRenders>>();
90− assert_eq!(comp.render_count.get(), 2);
91− assert_rendered(&container3, &RenderFn(|_| text("2")));
81+ .and_then(move |_| vdom4.weak().render())
82+ .and_then(move |_| {
83+ vdom5.weak().with_component(move |comp| {
84+ let comp = comp.unwrap_mut::<Cached<CountRenders>>();
85+ assert_eq!(comp.render_count.get(), 2);
86+ assert_rendered(&container3, &RenderFn(|_| text("2")));
87+ })
9288 })
93− .await
94− .unwrap();
95−
96− // We re-render, re-use the cached node, and get "2" again.
97− vdom6.weak().render().await.unwrap();
98− vdom7
99− .weak()
100− .with_component(move |comp| {
101− let comp = comp.unwrap_mut::<Cached<CountRenders>>();
102− assert_eq!(comp.render_count.get(), 2);
103− assert_rendered(&container4, &RenderFn(|_| text("2")));
89+ // We re-render, re-use the cached node, and get "2" again.
90+ .and_then(move |_| vdom6.weak().render())
91+ .and_then(move |_| {
92+ vdom7.weak().with_component(move |comp| {
93+ let comp = comp.unwrap_mut::<Cached<CountRenders>>();
94+ assert_eq!(comp.render_count.get(), 2);
95+ assert_rendered(&container4, &RenderFn(|_| text("2")));
96+ })
10497 })
105− .await
106− .unwrap();
98+ .map_err(|e| JsValue::from(e.to_string()))
10799}
108100
109101#[wasm_bindgen(module = "/tests/web/cached.js")]
@@ -112,8 +104,8 @@ extern "C" {
112104 fn get_clone_node_count() -> u32;
113105}
114106
115−#[wasm_bindgen_test]
116−async fn creating_cached_nodes_uses_clone_node() {
107+#[wasm_bindgen_test(async)]
108+fn creating_cached_nodes_uses_clone_node() -> impl Future<Item = (), Error = JsValue> {
117109 use dodrio::builder::*;
118110
119111 let container = create_element("div");
@@ -121,28 +113,28 @@ async fn creating_cached_nodes_uses_clone_node() {
121113 // The initial vdom render should populate the cache and save a template.
122114 let vdom0 = Rc::new(Vdom::new(&container, Cached::new(CountRenders::new())));
123115 let vdom1 = vdom0.clone();
124− let _vdom2 = vdom0.clone();
116+ let vdom2 = vdom0.clone();
125117
126118 let clone_node_count_before = get_clone_node_count();
127119
128− // Render something entirely different...
129120 vdom0
130121 .weak()
131− .set_component(Box::new(RenderFn(|_| text("hi"))) as Box<dyn RootRender>)
132− .await
133− .unwrap();
134−
135− // Re-render our cached node. Since we are creating it from scratch,
136− // and already have a template from the earlier render, we should
137− // call `cloneNode` here.
138− vdom1
139− .weak()
140− .set_component(Box::new(Cached::new(CountRenders::new())) as Box<dyn RootRender>)
141− .await
142− .unwrap();
143−
144− let clone_node_count_after = get_clone_node_count();
145− assert_eq!(clone_node_count_after, clone_node_count_before + 1);
122+ // Render something entirely different...
123+ .set_component(Box::new(RenderFn(|_| text("hi"))) as Box<RootRender>)
124+ .and_then(move |_| {
125+ // Re-render our cached node. Since we are creating it from scratch,
126+ // and already have a template from the earlier render, we should
127+ // call `cloneNode` here.
128+ vdom1
129+ .weak()
130+ .set_component(Box::new(Cached::new(CountRenders::new())) as Box<RootRender>)
131+ })
132+ .map(move |_| {
133+ let clone_node_count_after = get_clone_node_count();
134+ assert_eq!(clone_node_count_after, clone_node_count_before + 1);
135+ drop(vdom2);
136+ })
137+ .map_err(|e| JsValue::from(e.to_string()))
146138}
147139
148140struct Id(&'static str);
@@ -153,8 +145,8 @@ impl Default for Id {
153145 }
154146}
155147
156−impl<'a> Render<'a> for Id {
157− fn render(&self, _cx: &mut RenderContext<'a>) -> Node<'a> {
148+impl Render for Id {
149+ fn render<'a>(&self, _cx: &mut RenderContext<'a>) -> Node<'a> {
158150 text(self.0)
159151 }
160152}
tests/web/events.rs+73−56
@@ -1,6 +1,6 @@
11use super::create_element;
22use dodrio::{Node, Render, RenderContext, Vdom};
3−use futures::future::{select, Either};
3+use futures::Future;
44use std::cell::{Cell, RefCell};
55use std::rc::Rc;
66use wasm_bindgen::prelude::*;
@@ -9,7 +9,7 @@ use wasm_bindgen_test::*;
99
1010struct EventContainer {
1111 event: &'static str,
12− on_event: Box<dyn FnMut()>,
12+ on_event: Box<FnMut()>,
1313}
1414
1515impl EventContainer {
@@ -24,8 +24,8 @@ impl EventContainer {
2424 }
2525}
2626
27−impl<'a> Render<'a> for EventContainer {
28− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
27+impl Render for EventContainer {
28+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
2929 use dodrio::builder::*;
3030 div(&cx)
3131 .attr("id", "target")
@@ -44,14 +44,14 @@ fn target(container: &web_sys::Element) -> web_sys::HtmlElement {
4444 .unchecked_into()
4545}
4646
47−#[wasm_bindgen_test]
48−async fn click() {
47+#[wasm_bindgen_test(async)]
48+fn click() -> impl Future<Item = (), Error = JsValue> {
4949 let container = create_element("div");
5050
51− let (sender, receiver) = futures::channel::oneshot::channel();
51+ let (sender, receiver) = futures::sync::oneshot::channel();
5252 let mut sender = Some(sender);
5353
54− let _vdom = Vdom::new(
54+ let vdom = Vdom::new(
5555 &container,
5656 EventContainer::new("click", move || {
5757 sender
@@ -64,14 +64,18 @@ async fn click() {
6464
6565 target(&container).click();
6666
67− receiver.await.unwrap();
67+ receiver
68+ .map(|_| {
69+ drop(vdom);
70+ })
71+ .map_err(|e| JsValue::from(e.to_string()))
6872}
6973
70−#[wasm_bindgen_test]
71−async fn updated_listener_is_called() {
74+#[wasm_bindgen_test(async)]
75+fn updated_listener_is_called() -> impl Future<Item = (), Error = JsValue> {
7276 let container = create_element("div");
7377
74− let (first_sender, first_receiver) = futures::channel::oneshot::channel();
78+ let (first_sender, first_receiver) = futures::sync::oneshot::channel();
7579 let mut first_sender = Some(first_sender);
7680
7781 let vdom = Vdom::new(
@@ -85,7 +89,7 @@ async fn updated_listener_is_called() {
8589 }),
8690 );
8791
88− let (second_sender, second_receiver) = futures::channel::oneshot::channel();
92+ let (second_sender, second_receiver) = futures::sync::oneshot::channel();
8993 let mut second_sender = Some(second_sender);
9094
9195 vdom.weak()
@@ -96,22 +100,25 @@ async fn updated_listener_is_called() {
96100 .send("second")
97101 .expect_throw("should not have dropped the receiver");
98102 })))
99− .await
100− .unwrap();
101−
102− target(&container).click();
103−
104− match select(first_receiver, second_receiver).await {
105− Either::Left((Ok(_), _)) => panic!(),
106− Either::Left((Err(_), second)) => assert_eq!(second.await, Ok("second")),
107− Either::Right((Ok(msg), _)) => assert_eq!(msg, "second"),
108− Either::Right((Err(_), _)) => panic!(),
109− }
103+ .map_err(|e| JsValue::from(e.to_string()))
104+ .and_then(move |_| {
105+ target(&container).click();
106+
107+ first_receiver
108+ .select(second_receiver)
109+ .map(|(which, _other)| which)
110+ .or_else(|(_error, other)| other)
111+ .map(|which| {
112+ assert_eq!(which, "second");
113+ drop(vdom);
114+ })
115+ .map_err(|e| JsValue::from(e.to_string()))
116+ })
110117}
111118
112119struct ListensOnlyOnFirstRender {
113120 count: Cell<usize>,
114− callback: Box<dyn FnMut()>,
121+ callback: Box<FnMut()>,
115122}
116123
117124impl ListensOnlyOnFirstRender {
@@ -126,8 +133,8 @@ impl ListensOnlyOnFirstRender {
126133 }
127134}
128135
129−impl<'a> Render<'a> for ListensOnlyOnFirstRender {
130− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
136+impl Render for ListensOnlyOnFirstRender {
137+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
131138 use dodrio::builder::*;
132139
133140 let count = self.count.get();
@@ -143,11 +150,11 @@ impl<'a> Render<'a> for ListensOnlyOnFirstRender {
143150 }
144151}
145152
146−#[wasm_bindgen_test]
147−async fn removed_listener_is_not_called() {
153+#[wasm_bindgen_test(async)]
154+fn removed_listener_is_not_called() -> impl Future<Item = (), Error = JsValue> {
148155 let container = create_element("div");
149156
150− let (outer_sender, outer_receiver) = futures::channel::oneshot::channel();
157+ let (outer_sender, outer_receiver) = futures::sync::oneshot::channel();
151158 let outer_sender = Rc::new(RefCell::new(Some(outer_sender)));
152159 let outer_listener = Closure::wrap(Box::new(move |_| {
153160 outer_sender
@@ -156,13 +163,13 @@ async fn removed_listener_is_not_called() {
156163 .expect_throw("should only invoke outer_listener once")
157164 .send("outer")
158165 .expect_throw("should not have dropped receiver");
159− }) as Box<dyn FnMut(web_sys::Event)>);
166+ }) as Box<FnMut(web_sys::Event)>);
160167
161168 container
162169 .add_event_listener_with_callback("click", outer_listener.as_ref().unchecked_ref())
163170 .unwrap();
164171
165− let (vdom_sender, vdom_receiver) = futures::channel::oneshot::channel();
172+ let (vdom_sender, vdom_receiver) = futures::sync::oneshot::channel();
166173 let mut vdom_sender = Some(vdom_sender);
167174
168175 // Render a vdom with a listener into container.
@@ -177,26 +184,33 @@ async fn removed_listener_is_not_called() {
177184 }),
178185 );
179186
180− // Re-render, so we aren't listening anymore.
181− vdom.weak().render().await.unwrap();
182−
183− target(&container).click();
184−
185− // We should get our container's event handler fired, and not the unmounted
186− // vdom's event handler.
187− match select(outer_receiver, vdom_receiver).await {
188− Either::Left((Ok(msg), _)) => assert_eq!(msg, ("outer")),
189− Either::Left((Err(_), _)) => panic!(),
190− Either::Right((Ok(_), _)) => panic!(),
191− Either::Right((Err(_), outer)) => assert_eq!(outer.await, Ok("outer")),
192− }
187+ vdom.weak()
188+ // Re-render, so we aren't listening anymore.
189+ .render()
190+ .map_err(|e| JsValue::from(e.to_string()))
191+ .and_then(move |_| {
192+ target(&container).click();
193+
194+ // We should get our container's event handler fired, and not the unmounted
195+ // vdom's event handler.
196+ outer_receiver
197+ .select(vdom_receiver)
198+ .map(|(which, _other)| which)
199+ .or_else(|(_error, other)| other)
200+ .map(|which| {
201+ assert_eq!(which, "outer");
202+ drop(outer_listener);
203+ drop(vdom)
204+ })
205+ .map_err(|e| JsValue::from(e.to_string()))
206+ })
193207}
194208
195−#[wasm_bindgen_test]
196−async fn event_does_not_fire_after_unmounting() {
209+#[wasm_bindgen_test(async)]
210+fn event_does_not_fire_after_unmounting() -> impl Future<Item = (), Error = JsValue> {
197211 let container = create_element("div");
198212
199− let (outer_sender, outer_receiver) = futures::channel::oneshot::channel();
213+ let (outer_sender, outer_receiver) = futures::sync::oneshot::channel();
200214 let outer_sender = Rc::new(RefCell::new(Some(outer_sender)));
201215 let outer_listener = Closure::wrap(Box::new(move |_| {
202216 outer_sender
@@ -205,13 +219,13 @@ async fn event_does_not_fire_after_unmounting() {
205219 .expect_throw("should only invoke outer_listener once")
206220 .send("outer")
207221 .expect_throw("should not have dropped receiver");
208− }) as Box<dyn FnMut(web_sys::Event)>);
222+ }) as Box<FnMut(web_sys::Event)>);
209223
210224 container
211225 .add_event_listener_with_callback("click", outer_listener.as_ref().unchecked_ref())
212226 .unwrap();
213227
214− let (vdom_sender, vdom_receiver) = futures::channel::oneshot::channel();
228+ let (vdom_sender, vdom_receiver) = futures::sync::oneshot::channel();
215229 let mut vdom_sender = Some(vdom_sender);
216230
217231 // Render a vdom with a listener into container.
@@ -241,10 +255,13 @@ async fn event_does_not_fire_after_unmounting() {
241255
242256 // We should get our container's event handler fired, and not the unmounted
243257 // vdom's event handler.
244− match select(outer_receiver, vdom_receiver).await {
245− Either::Left((Ok(msg), _)) => assert_eq!(msg, ("outer")),
246− Either::Left((Err(_), _)) => panic!(),
247− Either::Right((Ok(_), _)) => panic!(),
248− Either::Right((Err(_), outer)) => assert_eq!(outer.await, Ok("outer")),
249− }
258+ outer_receiver
259+ .select(vdom_receiver)
260+ .map(|(which, _other)| which)
261+ .or_else(|(_error, other)| other)
262+ .map(|which| {
263+ assert_eq!(which, "outer");
264+ drop(outer_listener);
265+ })
266+ .map_err(|e| JsValue::from(e.to_string()))
250267}
tests/web/js_api.rs+37−30
@@ -1,7 +1,8 @@
11use super::{assert_rendered, create_element, RenderFn};
22use dodrio::{builder::*, Node, Render, RenderContext, Vdom};
33use dodrio_js_api::JsRender;
4−use futures::channel::oneshot;
4+use futures::prelude::*;
5+use futures::sync::oneshot;
56use js_sys::Object;
67use std::rc::Rc;
78use wasm_bindgen::prelude::*;
@@ -13,7 +14,7 @@ pub struct WrapJs {
1314}
1415
1516impl WrapJs {
16− pub fn new() -> (WrapJs, oneshot::Receiver<()>, Closure<dyn FnMut()>) {
17+ pub fn new() -> (WrapJs, oneshot::Receiver<()>, Closure<FnMut()>) {
1718 let (sender, receiver) = oneshot::channel();
1819
1920 let on_after_render = Closure::wrap(Box::new({
@@ -25,7 +26,7 @@ impl WrapJs {
2526 .send(())
2627 .expect_throw("receiver should not have been dropped");
2728 }
28− }) as Box<dyn FnMut()>);
29+ }) as Box<FnMut()>);
2930
3031 let component = WrapJs {
3132 inner: JsRender::new(JsComponent::new(&on_after_render)),
@@ -35,8 +36,8 @@ impl WrapJs {
3536 }
3637}
3738
38−impl<'a> Render<'a> for WrapJs {
39− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
39+impl Render for WrapJs {
40+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
4041 div(&cx)
4142 .attr("class", "wrap-js")
4243 .children([self.inner.render(cx)])
@@ -51,7 +52,7 @@ extern "C" {
5152 type JsComponent;
5253
5354 #[wasm_bindgen(constructor)]
54− fn new(on_after_render: &Closure<dyn FnMut()>) -> JsComponent;
55+ fn new(on_after_render: &Closure<FnMut()>) -> JsComponent;
5556}
5657
5758fn eval_js_rendering_component() {
@@ -95,14 +96,14 @@ fn eval_js_rendering_component() {
9596 });
9697}
9798
98−#[wasm_bindgen_test]
99−async fn can_use_js_rendering_components() {
99+#[wasm_bindgen_test(async)]
100+fn can_use_js_rendering_components() -> impl Future<Item = (), Error = JsValue> {
100101 eval_js_rendering_component();
101102
102103 let container = create_element("div");
103− let (component, receiver, _closure) = WrapJs::new();
104− let _vdom = Rc::new(Vdom::new(&container, component));
104+ let (component, receiver, closure) = WrapJs::new();
105105
106+ let vdom = Rc::new(Vdom::new(&container, component));
106107 assert_rendered(
107108 &container,
108109 &RenderFn(|cx| {
@@ -130,24 +131,30 @@ async fn can_use_js_rendering_components() {
130131 .expect_throw("should be an `HTMLElement` object")
131132 .click();
132133
133− receiver.await.unwrap();
134−
135− assert_rendered(
136− &container,
137− &RenderFn(|cx| {
138− div(&cx)
139− .attr("class", "wrap-js")
140− .children([span(&cx)
141− .attr("class", "js-component")
142− .children([
143− text("Here is some plain text"),
144− b(&cx)
145− .children([text("...and here is some bold text")])
146− .finish(),
147− text("1"),
148− ])
149− .finish()])
150− .finish()
151− }),
152− );
134+ receiver
135+ .map(move |_| {
136+ assert_rendered(
137+ &container,
138+ &RenderFn(|cx| {
139+ div(&cx)
140+ .attr("class", "wrap-js")
141+ .children([span(&cx)
142+ .attr("class", "js-component")
143+ .children([
144+ text("Here is some plain text"),
145+ b(&cx)
146+ .children([text("...and here is some bold text")])
147+ .finish(),
148+ text("1"),
149+ ])
150+ .finish()])
151+ .finish()
152+ }),
153+ );
154+
155+ drop(vdom);
156+ drop(container);
157+ drop(closure);
158+ })
159+ .map_err(|e| e.to_string().into())
153160}
tests/web/keyed.rs+19−18
@@ -1,5 +1,6 @@
11use crate::{assert_rendered, create_element};
22use dodrio::{builder::*, bumpalo, Node, Render, RenderContext, Vdom};
3+use futures::Future;
34use log::*;
45use std::rc::Rc;
56use wasm_bindgen::prelude::*;
@@ -7,8 +8,8 @@ use wasm_bindgen_test::*;
78
89struct Keyed(u16);
910
10−impl<'a> Render<'a> for Keyed {
11− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
11+impl Render for Keyed {
12+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
1213 let key = bumpalo::format!(in cx.bump, "{}", self.0).into_bump_str();
1314 div(&cx)
1415 .attr("class", "keyed")
@@ -31,10 +32,13 @@ where
3132 parent.finish()
3233}
3334
34−async fn assert_keyed<Before, After>(before: Before, after: After) -> Result<(), JsValue>
35+fn assert_keyed<Before, After>(
36+ before: Before,
37+ after: After,
38+) -> impl Future<Item = (), Error = JsValue>
3539where
36− Before: 'static + for<'a> Render<'a>,
37− After: 'static + for<'a> Render<'a>,
40+ Before: 'static + Render,
41+ After: 'static + Render,
3842{
3943 #[wasm_bindgen(module = "/tests/web/keyed.js")]
4044 extern "C" {
@@ -52,7 +56,7 @@ where
5256
5357 debug!("====== Rendering the *before* DOM into the physical DOM ======");
5458 let vdom1 = Rc::new(Vdom::new(&container, before.clone()));
55− let _vdom2 = vdom1.clone();
59+ let vdom2 = vdom1.clone();
5660 let saved = save_keyed_elements(&container);
5761
5862 debug!("====== Checking the *before* DOM against the physical DOM ======");
@@ -61,14 +65,13 @@ where
6165 debug!("====== Rendering the *after* DOM into the physical DOM ======");
6266 let weak = vdom1.weak();
6367 weak.set_component(Box::new(after.clone()))
64− .await
65− .map_err(|e| e.to_string())?;
66−
67− debug!("====== Checking the *after* DOM against the physical DOM ======");
68− assert_rendered(&container, &after);
69− check_keyed_elements(&container, saved);
70−
71− Ok(())
68+ .map(move |_| {
69+ debug!("====== Checking the *after* DOM against the physical DOM ======");
70+ assert_rendered(&container, &after);
71+ check_keyed_elements(&container, saved);
72+ drop(vdom2);
73+ })
74+ .map_err(|e| JsValue::from(e.to_string()))
7275}
7376
7477macro_rules! keyed_tests {
@@ -83,16 +86,14 @@ macro_rules! keyed_tests {
8386 }
8487 )* ) => {
8588 $(
86− #[wasm_bindgen_test]
87− async fn $name() {
89+ #[wasm_bindgen_test(async)]
90+ fn $name() -> impl Future<Item = (), Error = wasm_bindgen::JsValue> {
8891 use crate::RenderFn;
8992 log::debug!("############### {} ###############", stringify!($name));
9093 assert_keyed(
9194 RenderFn(|$before_cx| { $( $before )* }),
9295 RenderFn(|$after_cx| { $( $after )* }),
9396 )
94− .await
95− .unwrap()
9697 }
9798 )*
9899 }
tests/web/main.rs+17−19
@@ -6,6 +6,7 @@ use bumpalo::Bump;
66use dodrio::{
77 Attribute, CachedSet, ElementNode, Node, NodeKind, Render, RenderContext, TextNode, Vdom,
88};
9+use futures::prelude::*;
910use fxhash::FxHashMap;
1011use log::*;
1112use std::cell::RefCell;
@@ -50,7 +51,7 @@ pub fn init_logging() {
5051
5152/// Assert that the `container` contains the physical DOM tree that matches
5253/// `r`'s rendered virtual DOM.
53−pub fn assert_rendered<R: for<'a> Render<'a>>(container: &web_sys::Element, r: &R) {
54+pub fn assert_rendered<R: Render>(container: &web_sys::Element, r: &R) {
5455 init_logging();
5556
5657 let cached_set = &RefCell::new(CachedSet::default());
@@ -155,11 +156,11 @@ pub struct RenderFn<F>(F)
155156where
156157 F: for<'a> Fn(&mut RenderContext<'a>) -> Node<'a>;
157158
158−impl<'a, F> Render<'a> for RenderFn<F>
159+impl<F> Render for RenderFn<F>
159160where
160− F: for<'b> Fn(&mut RenderContext<'b>) -> Node<'b>,
161+ F: for<'a> Fn(&mut RenderContext<'a>) -> Node<'a>,
161162{
162− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
163+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
163164 (self.0)(cx)
164165 }
165166}
@@ -167,10 +168,10 @@ where
167168/// Assert that if we start by rendering the `before` virtual DOM tree into a
168169/// physical DOM tree, and then diff it with the `after` virtual DOM tree, then
169170/// the physical DOM tree correctly matches `after`.
170−pub async fn assert_before_after<R, S>(before: R, after: S) -> Result<(), JsValue>
171+pub fn assert_before_after<R, S>(before: R, after: S) -> impl Future<Item = (), Error = JsValue>
171172where
172− R: 'static + for<'a> Render<'a>,
173− S: 'static + for<'a> Render<'a>,
173+ R: 'static + Render,
174+ S: 'static + Render,
174175{
175176 let container = create_element("div");
176177
@@ -179,7 +180,7 @@ where
179180
180181 debug!("====== Rendering the *before* DOM into the physical DOM ======");
181182 let vdom1 = Rc::new(Vdom::new(&container, before.clone()));
182− let _vdom2 = vdom1.clone();
183+ let vdom2 = vdom1.clone();
183184
184185 debug!("====== Checking the *before* DOM against the physical DOM ======");
185186 assert_rendered(&container, &before);
@@ -187,13 +188,12 @@ where
187188 debug!("====== Rendering the *after* DOM into the physical DOM ======");
188189 let weak = vdom1.weak();
189190 weak.set_component(Box::new(after.clone()))
190− .await
191− .map_err(|e| e.to_string())?;
192−
193− debug!("====== Checking the *after* DOM against the physical DOM ======");
194− assert_rendered(&container, &after);
195−
196− Ok(())
191+ .map(move |_| {
192+ debug!("====== Checking the *after* DOM against the physical DOM ======");
193+ assert_rendered(&container, &after);
194+ drop(vdom2);
195+ })
196+ .map_err(|e| JsValue::from(e.to_string()))
197197}
198198
199199/// A helper macro for declaring a bunch of `assert_before_after` tests.
@@ -210,16 +210,14 @@ macro_rules! before_after {
210210 }
211211 )* ) => {
212212 $(
213− #[wasm_bindgen_test]
214− async fn $name() {
213+ #[wasm_bindgen_test(async)]
214+ fn $name() -> impl Future<Item = (), Error = wasm_bindgen::JsValue> {
215215 use crate::{assert_before_after, RenderFn};
216216 log::debug!("############### {} ###############", stringify!($name));
217217 assert_before_after(
218218 RenderFn(|$before_bump| { $( $before )* }),
219219 RenderFn(|$after_bump| { $( $after )* })
220220 )
221− .await
222− .unwrap()
223221 }
224222 )*
225223 }
tests/web/render.rs+2−89
@@ -1,7 +1,7 @@
11use super::{assert_rendered, before_after, create_element, RenderFn};
2−use dodrio::{builder::*, bumpalo::collections::String, Node, Render, RenderContext, Vdom};
2+use dodrio::{builder::*, Vdom};
3+use futures::prelude::*;
34use std::rc::Rc;
4−use wasm_bindgen::{ JsCast};
55use wasm_bindgen_test::*;
66
77#[wasm_bindgen_test]
@@ -35,93 +35,6 @@ fn container_is_emptied_upon_drop() {
3535 assert!(container.first_child().is_none());
3636}
3737
38−/// Renders a child with a lifetime scoped to the RenderContext bump arena.
39−#[wasm_bindgen_test]
40−fn render_bump_scoped_node() {
41− struct Child<'a> {
42− name: &'a str,
43− }
44−
45− impl<'a> Render<'a> for Child<'a> {
46− fn render(&self, _cx: &mut RenderContext<'a>) -> Node<'a> {
47− text(self.name)
48− }
49− }
50−
51− struct Parent;
52−
53− impl<'a> Render<'a> for Parent {
54− fn render(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
55− let child_name = String::from_str_in("child", cx.bump).into_bump_str();
56−
57− div(&cx)
58− .children([Child { name: child_name }.render(cx)])
59− .finish()
60− }
61− }
62−
63− let parent = Rc::new(RenderFn(|cx| {
64− Parent.render(cx)
65− }));
66−
67− let container = create_element("div");
68− let _vdom = Vdom::new(&container, parent.clone());
69−
70− assert_rendered(&container, &parent);
71−}
72−
73−/// Originally, dodrio would use the className property for SVGs.
74−///
75−/// This is problematic because when SVG elements are created, the className is flagged as a read
76−/// only property, so setting it causes an exception to be thrown. Here's an example of how this
77−/// happens:
78−///
79−/// let elem = web_sys::window()
80−/// .unwrap()
81−/// .document()
82−/// .unwrap()
83−/// .create_element_ns(Some("http://www.w3.org/2000/svg"), "svg")
84−/// .unwrap();
85−///
86−/// elem.set_class_name("does-not-work");
87−///
88−/// -----------------------------------------------------------------------------------------------
89−///
90−/// wasm-bindgen: imported JS function that was not marked as `catch` threw an error:
91−/// setting getter-only property "className"
92−///
93−/// -----------------------------------------------------------------------------------------------
94−///
95−/// Now, dodrio passes the 'class' attribute of all namespaced elements into set_attribute. This
96−/// satisfies the restrictions on SVG and keeps the optimized path for non-namespaced elements
97−#[wasm_bindgen_test(async)]
98−async fn test_svg_set_class() {
99− let container = create_element("div");
100−
101−
102− let valid_svg = Rc::new(RenderFn(|cx| {
103− ElementBuilder::new(cx.bump, "svg")
104− .namespace(Some("http://www.w3.org/2000/svg"))
105− .attr("class", "works")
106− .finish()
107− }));
108−
109− let vdom = Vdom::new(&container, valid_svg.clone());
110− let weak = vdom.weak();
111−
112− weak.render().await.unwrap();
113−
114− assert_eq!(
115− "works",
116− container.first_child()
117− .expect("unable to get svg")
118− .dyn_ref::<web_sys::Element>()
119− .expect("svg should be an element")
120− .get_attribute("class")
121− .expect("unable to get 'class' of svg")
122− );
123−}
124−
12538before_after! {
12639 same_text {
12740 before(_cx) {