on master help sign in
Merge pull request #8 from fitzgen/testing
23d800fNick Fitzgerald
Cargo.lock+85−92
@@ -3,7 +3,7 @@ name = "aho-corasick"
3version = "0.6.9"
3version = "0.6.9"
4source = "registry+https://github.com/rust-lang/crates.io-index"
4source = "registry+https://github.com/rust-lang/crates.io-index"
5dependencies = [
5dependencies = [
6− "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
6+ "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
7]
7]
8
8
9[[package]]
9[[package]]
@@ -18,7 +18,7 @@ dependencies = [
18
18
19[[package]]
19[[package]]
20name = "autocfg"
20name = "autocfg"
21−version = "0.1.1"
21+version = "0.1.2"
22source = "registry+https://github.com/rust-lang/crates.io-index"
22source = "registry+https://github.com/rust-lang/crates.io-index"
23
23
24[[package]]
24[[package]]
@@ -26,7 +26,7 @@ name = "backtrace"
26version = "0.3.13"
26version = "0.3.13"
27source = "registry+https://github.com/rust-lang/crates.io-index"
27source = "registry+https://github.com/rust-lang/crates.io-index"
28dependencies = [
28dependencies = [
29− "autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
29+ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
30 "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
30 "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
31 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
31 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
32 "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
32 "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -64,7 +64,7 @@ version = "0.1.5"
64source = "registry+https://github.com/rust-lang/crates.io-index"
64source = "registry+https://github.com/rust-lang/crates.io-index"
65dependencies = [
65dependencies = [
66 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
66 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
67− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
67+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
68]
68]
69
69
70[[package]]
70[[package]]
@@ -73,7 +73,7 @@ version = "0.1.2"
73source = "registry+https://github.com/rust-lang/crates.io-index"
73source = "registry+https://github.com/rust-lang/crates.io-index"
74dependencies = [
74dependencies = [
75 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
75 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
76− "web-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
76+ "web-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
77]
77]
78
78
79[[package]]
79[[package]]
@@ -82,11 +82,11 @@ version = "0.1.0"
82dependencies = [
82dependencies = [
83 "bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
83 "bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
84 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
84 "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
85− "js-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
85+ "js-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
86 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
86 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
87− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
87+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
88− "wasm-bindgen-test 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
88+ "wasm-bindgen-test 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
89− "web-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
89+ "web-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
90]
90]
91
91
92[[package]]
92[[package]]
@@ -96,9 +96,9 @@ dependencies = [
96 "bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
96 "bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
97 "console_error_panic_hook 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
97 "console_error_panic_hook 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
98 "dodrio 0.1.0",
98 "dodrio 0.1.0",
99− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
99+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
100− "wasm-bindgen-test 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
100+ "wasm-bindgen-test 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
101− "web-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
101+ "web-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
102]
102]
103
103
104[[package]]
104[[package]]
@@ -108,9 +108,9 @@ dependencies = [
108 "bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
108 "bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
109 "console_error_panic_hook 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
109 "console_error_panic_hook 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
110 "dodrio 0.1.0",
110 "dodrio 0.1.0",
111− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
111+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
112− "wasm-bindgen-test 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
112+ "wasm-bindgen-test 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
113− "web-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
113+ "web-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
114]
114]
115
115
116[[package]]
116[[package]]
@@ -120,9 +120,9 @@ dependencies = [
120 "bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
120 "bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
121 "console_error_panic_hook 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
121 "console_error_panic_hook 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
122 "dodrio 0.1.0",
122 "dodrio 0.1.0",
123− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
123+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
124− "wasm-bindgen-test 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
124+ "wasm-bindgen-test 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
125− "web-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
125+ "web-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
126]
126]
127
127
128[[package]]
128[[package]]
@@ -151,8 +151,8 @@ name = "failure_derive"
151version = "0.1.5"
151version = "0.1.5"
152source = "registry+https://github.com/rust-lang/crates.io-index"
152source = "registry+https://github.com/rust-lang/crates.io-index"
153dependencies = [
153dependencies = [
154− "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
154+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
155− "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
155+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
156 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
156 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
157 "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
157 "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
158]
158]
@@ -180,10 +180,10 @@ dependencies = [
180
180
181[[package]]
181[[package]]
182name = "js-sys"
182name = "js-sys"
183−version = "0.3.9"
183+version = "0.3.10"
184source = "registry+https://github.com/rust-lang/crates.io-index"
184source = "registry+https://github.com/rust-lang/crates.io-index"
185dependencies = [
185dependencies = [
186− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
186+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
187]
187]
188
188
189[[package]]
189[[package]]
@@ -206,12 +206,11 @@ dependencies = [
206
206
207[[package]]
207[[package]]
208name = "memchr"
208name = "memchr"
209−version = "2.1.2"
209+version = "2.1.3"
210source = "registry+https://github.com/rust-lang/crates.io-index"
210source = "registry+https://github.com/rust-lang/crates.io-index"
211dependencies = [
211dependencies = [
212 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
212 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
213 "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
213 "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
214− "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
215]
214]
216
215
217[[package]]
216[[package]]
@@ -219,12 +218,12 @@ name = "nom"
219version = "4.1.1"
218version = "4.1.1"
220source = "registry+https://github.com/rust-lang/crates.io-index"
219source = "registry+https://github.com/rust-lang/crates.io-index"
221dependencies = [
220dependencies = [
222− "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
221+ "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
223]
222]
224
223
225[[package]]
224[[package]]
226name = "proc-macro2"
225name = "proc-macro2"
227−version = "0.4.25"
226+version = "0.4.26"
228source = "registry+https://github.com/rust-lang/crates.io-index"
227source = "registry+https://github.com/rust-lang/crates.io-index"
229dependencies = [
228dependencies = [
230 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
229 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -237,15 +236,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
237
236
238[[package]]
237[[package]]
239name = "quote"
238name = "quote"
240−version = "0.6.10"
239+version = "0.6.11"
241source = "registry+https://github.com/rust-lang/crates.io-index"
240source = "registry+https://github.com/rust-lang/crates.io-index"
242dependencies = [
241dependencies = [
243− "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
242+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
244]
243]
245
244
246[[package]]
245[[package]]
247name = "redox_syscall"
246name = "redox_syscall"
248−version = "0.1.50"
247+version = "0.1.51"
249source = "registry+https://github.com/rust-lang/crates.io-index"
248source = "registry+https://github.com/rust-lang/crates.io-index"
250
249
251[[package]]
250[[package]]
@@ -253,7 +252,7 @@ name = "redox_termios"
253version = "0.1.1"
252version = "0.1.1"
254source = "registry+https://github.com/rust-lang/crates.io-index"
253source = "registry+https://github.com/rust-lang/crates.io-index"
255dependencies = [
254dependencies = [
256− "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)",
255+ "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)",
257]
256]
258
257
259[[package]]
258[[package]]
@@ -262,7 +261,7 @@ version = "1.1.0"
262source = "registry+https://github.com/rust-lang/crates.io-index"
261source = "registry+https://github.com/rust-lang/crates.io-index"
263dependencies = [
262dependencies = [
264 "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
263 "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
265− "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
264+ "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
266 "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
265 "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
267 "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
266 "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
268 "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
267 "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -296,8 +295,8 @@ name = "syn"
296version = "0.15.26"
295version = "0.15.26"
297source = "registry+https://github.com/rust-lang/crates.io-index"
296source = "registry+https://github.com/rust-lang/crates.io-index"
298dependencies = [
297dependencies = [
299− "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
298+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
300− "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
299+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
301 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
300 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
302]
301]
303
302
@@ -306,8 +305,8 @@ name = "synstructure"
306version = "0.10.1"
305version = "0.10.1"
307source = "registry+https://github.com/rust-lang/crates.io-index"
306source = "registry+https://github.com/rust-lang/crates.io-index"
308dependencies = [
307dependencies = [
309− "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
308+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
310− "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
309+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
311 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
310 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
312 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
311 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
313]
312]
@@ -326,7 +325,7 @@ version = "1.5.1"
326source = "registry+https://github.com/rust-lang/crates.io-index"
325source = "registry+https://github.com/rust-lang/crates.io-index"
327dependencies = [
326dependencies = [
328 "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
327 "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
329− "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)",
328+ "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)",
330 "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
329 "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
331]
330]
332
331
@@ -358,117 +357,112 @@ name = "utf8-ranges"
358version = "1.0.2"
357version = "1.0.2"
359source = "registry+https://github.com/rust-lang/crates.io-index"
358source = "registry+https://github.com/rust-lang/crates.io-index"
360
359
361−[[package]]
362−name = "version_check"
363−version = "0.1.5"
364−source = "registry+https://github.com/rust-lang/crates.io-index"
365−
366[[package]]
360[[package]]
367name = "wasm-bindgen"
361name = "wasm-bindgen"
368−version = "0.2.32"
362+version = "0.2.33"
369source = "registry+https://github.com/rust-lang/crates.io-index"
363source = "registry+https://github.com/rust-lang/crates.io-index"
370dependencies = [
364dependencies = [
371− "wasm-bindgen-macro 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
365+ "wasm-bindgen-macro 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
372]
366]
373
367
374[[package]]
368[[package]]
375name = "wasm-bindgen-backend"
369name = "wasm-bindgen-backend"
376−version = "0.2.32"
370+version = "0.2.33"
377source = "registry+https://github.com/rust-lang/crates.io-index"
371source = "registry+https://github.com/rust-lang/crates.io-index"
378dependencies = [
372dependencies = [
379 "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
373 "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
380 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
374 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
381− "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
375+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
382− "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
376+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
383 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
377 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
384− "wasm-bindgen-shared 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
378+ "wasm-bindgen-shared 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
385]
379]
386
380
387[[package]]
381[[package]]
388name = "wasm-bindgen-futures"
382name = "wasm-bindgen-futures"
389−version = "0.3.9"
383+version = "0.3.10"
390source = "registry+https://github.com/rust-lang/crates.io-index"
384source = "registry+https://github.com/rust-lang/crates.io-index"
391dependencies = [
385dependencies = [
392 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
386 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
393− "js-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
387+ "js-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
394− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
388+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
395]
389]
396
390
397[[package]]
391[[package]]
398name = "wasm-bindgen-macro"
392name = "wasm-bindgen-macro"
399−version = "0.2.32"
393+version = "0.2.33"
400source = "registry+https://github.com/rust-lang/crates.io-index"
394source = "registry+https://github.com/rust-lang/crates.io-index"
401dependencies = [
395dependencies = [
402− "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
396+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
403− "wasm-bindgen-macro-support 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
397+ "wasm-bindgen-macro-support 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
404]
398]
405
399
406[[package]]
400[[package]]
407name = "wasm-bindgen-macro-support"
401name = "wasm-bindgen-macro-support"
408−version = "0.2.32"
402+version = "0.2.33"
409source = "registry+https://github.com/rust-lang/crates.io-index"
403source = "registry+https://github.com/rust-lang/crates.io-index"
410dependencies = [
404dependencies = [
411− "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
405+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
412− "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
406+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
413 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
407 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
414− "wasm-bindgen-backend 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
408+ "wasm-bindgen-backend 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
415− "wasm-bindgen-shared 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
409+ "wasm-bindgen-shared 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
416]
410]
417
411
418[[package]]
412[[package]]
419name = "wasm-bindgen-shared"
413name = "wasm-bindgen-shared"
420−version = "0.2.32"
414+version = "0.2.33"
421source = "registry+https://github.com/rust-lang/crates.io-index"
415source = "registry+https://github.com/rust-lang/crates.io-index"
422
416
423[[package]]
417[[package]]
424name = "wasm-bindgen-test"
418name = "wasm-bindgen-test"
425−version = "0.2.32"
419+version = "0.2.33"
426source = "registry+https://github.com/rust-lang/crates.io-index"
420source = "registry+https://github.com/rust-lang/crates.io-index"
427dependencies = [
421dependencies = [
428 "console_error_panic_hook 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
422 "console_error_panic_hook 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
429 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
423 "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
430− "js-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
424+ "js-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
431 "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
425 "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
432− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
426+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
433− "wasm-bindgen-futures 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
427+ "wasm-bindgen-futures 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
434− "wasm-bindgen-test-macro 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
428+ "wasm-bindgen-test-macro 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
435]
429]
436
430
437[[package]]
431[[package]]
438name = "wasm-bindgen-test-macro"
432name = "wasm-bindgen-test-macro"
439−version = "0.2.32"
433+version = "0.2.33"
440source = "registry+https://github.com/rust-lang/crates.io-index"
434source = "registry+https://github.com/rust-lang/crates.io-index"
441dependencies = [
435dependencies = [
442− "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
436+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
443− "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
437+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
444]
438]
445
439
446[[package]]
440[[package]]
447name = "wasm-bindgen-webidl"
441name = "wasm-bindgen-webidl"
448−version = "0.2.26"
442+version = "0.2.27"
449source = "registry+https://github.com/rust-lang/crates.io-index"
443source = "registry+https://github.com/rust-lang/crates.io-index"
450dependencies = [
444dependencies = [
451 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
445 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
452 "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
446 "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
453 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
447 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
454− "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
448+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
455− "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
449+ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
456 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
450 "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
457− "wasm-bindgen-backend 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
451+ "wasm-bindgen-backend 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
458 "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
452 "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
459]
453]
460
454
461[[package]]
455[[package]]
462name = "web-sys"
456name = "web-sys"
463−version = "0.3.9"
457+version = "0.3.10"
464source = "registry+https://github.com/rust-lang/crates.io-index"
458source = "registry+https://github.com/rust-lang/crates.io-index"
465dependencies = [
459dependencies = [
466 "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
460 "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
467 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
461 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
468− "js-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
462+ "js-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
469 "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
463 "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
470− "wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
464+ "wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
471− "wasm-bindgen-webidl 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
465+ "wasm-bindgen-webidl 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
472]
466]
473
467
474[[package]]
468[[package]]
@@ -518,7 +512,7 @@ dependencies = [
518[metadata]
512[metadata]
519"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e"
513"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e"
520"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
514"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
521−"checksum autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e5f34df7a019573fb8bdc7e24a2bfebe51a2a1d6bfdbaeccedb3c41fc574727"
515+"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799"
522"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5"
516"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5"
523"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6"
517"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6"
524"checksum bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "38da2bd7a4195f03c07e3cb21d7963729722541c6b94ec245ac818eab48b2ff7"
518"checksum bumpalo 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "38da2bd7a4195f03c07e3cb21d7963729722541c6b94ec245ac818eab48b2ff7"
@@ -532,16 +526,16 @@ dependencies = [
532"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b"
526"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b"
533"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
527"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
534"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114"
528"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114"
535−"checksum js-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ed193fd4e8f0f40a417f904357af9defa269f462fdd4f2219f797e6191ca3b1c"
529+"checksum js-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "f0edfcbe54ba2071053f2e67f5dfbcea344b69aedfb371b76e27392427a5750f"
536"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
530"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
537"checksum libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "48450664a984b25d5b479554c29cc04e3150c97aa4c01da5604a2d4ed9151476"
531"checksum libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "48450664a984b25d5b479554c29cc04e3150c97aa4c01da5604a2d4ed9151476"
538"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
532"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
539−"checksum memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db4c41318937f6e76648f42826b1d9ade5c09cafb5aef7e351240a70f39206e9"
533+"checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8"
540"checksum nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9c349f68f25f596b9f44cf0e7c69752a5c633b0550c3ff849518bfba0233774a"
534"checksum nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9c349f68f25f596b9f44cf0e7c69752a5c633b0550c3ff849518bfba0233774a"
541−"checksum proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "d3797b7142c9aa74954e351fc089bbee7958cebbff6bf2815e7ffff0b19f547d"
535+"checksum proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "38fddd23d98b2144d197c0eca5705632d4fe2667d14a6be5df8934f8d74f1978"
542"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
536"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
543−"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
537+"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1"
544−"checksum redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)" = "52ee9a534dc1301776eff45b4fa92d2c39b1d8c3d3357e6eb593e0d795506fc2"
538+"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85"
545"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
539"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
546"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f"
540"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f"
547"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1"
541"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1"
@@ -557,17 +551,16 @@ dependencies = [
557"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1"
551"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1"
558"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
552"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
559"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
553"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
560−"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
561−"checksum wasm-bindgen 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "710152b9cc4b688f91a23ad1574d0f3d6334ccb883896f6886531dc536944330"
554+"checksum wasm-bindgen 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "2d8c1eb210a0e91e24feb8ccd6f7484a5d442bfdf2ff179204b3a1d16e1029cc"
562−"checksum wasm-bindgen-backend 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "1f425d1c38c61c25d6ce5a07411cc9f859fbb1bac0eccdf812d7e7e521d4214a"
555+"checksum wasm-bindgen-backend 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "57ab9a5e88bf5dea5be82bb5f8b68c0f8e550675796ac88570ea4c4e89923413"
563−"checksum wasm-bindgen-futures 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1b78d6049bba69b8550ec68a541cad41c3ebbdb40e69d8d7e21b7cf889f22dea"
556+"checksum wasm-bindgen-futures 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d35a917b7c857bf8bce3e47d51d7d74a074d467aa2b750857fc7d9f878483124"
564−"checksum wasm-bindgen-macro 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "8541976809a58d1f08c3689c8ec3d98c9a7910794b1642f96dea56beb527aa1e"
557+"checksum wasm-bindgen-macro 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "52909345426e198a0d34f63526f9f4d86ca50c24b4a22a019d0bc86570ffe1e3"
565−"checksum wasm-bindgen-macro-support 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "e3296c9a30e13a2672e5dbe41a7258e54c74512b579cee1de7c17c7f60080231"
558+"checksum wasm-bindgen-macro-support 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "2a130a5906bd540390cda0a28e7f8a2d450222461beb92a5eb5c6a33b8b8bc2a"
566−"checksum wasm-bindgen-shared 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "a6c76e3857dc73f19bb3ef9f228f1b7f2552c7bba44a43e3df68daee79e2d963"
559+"checksum wasm-bindgen-shared 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "9c406cd5b42c36db6f76f17d28bcd26187fd90cda686231f3d04de07a716fc3a"
567−"checksum wasm-bindgen-test 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "6333f80ed95175356d7fde8c7546fc6253ccb64050ad285d5ac0ec446da0f518"
560+"checksum wasm-bindgen-test 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "edda7c4a76a8b2c1852e2bf707c3c537ae1a910fe5324bda77b10d249b6afd51"
568−"checksum wasm-bindgen-test-macro 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "7b498dddf81ef021a6ff088132116558471713f7bf7015bd3f66b14a55643702"
561+"checksum wasm-bindgen-test-macro 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "1a97eada8f48c14b098237f45332b3b9d88bbc15ee9f93bf2478853fae85ebf2"
569−"checksum wasm-bindgen-webidl 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6121ab08bb3d6f8e5d6c4aab25db8909cb0d3a17506031131fa73df9349d70"
562+"checksum wasm-bindgen-webidl 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)" = "068ab8c6b5682c5ac2aa7c2178ecdfc91143e3d62da458997ee1299c3fbf0e85"
570−"checksum web-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "505280f2d416df8ac559604b8184a65afd0de4ac11928fd1b6c5f9fc7e581e2e"
563+"checksum web-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53890ae11f09f4f08f8dc0d76d03cedfb4aa1f667b17ee1b9d6aa23b314cb940"
571"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044"
564"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044"
572"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
565"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
573"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
566"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
src/vdom.rs+15−15
@@ -186,34 +186,35 @@ impl Vdom {
186 self.change_list.emit_push_first_child();
186 self.change_list.emit_push_first_child();
187 pushed = true;
187 pushed = true;
188 } else {
188 } else {
189+ debug_assert!(pushed);
189 self.change_list.emit_pop_push_next_sibling();
190 self.change_list.emit_pop_push_next_sibling();
190 }
191 }
191
192
192 self.diff(old_child.clone(), new_child.clone());
193 self.diff(old_child.clone(), new_child.clone());
193 }
194 }
194
195
195− debug!(" removing extra old children");
196−
197 if old_children.next().is_some() {
196 if old_children.next().is_some() {
197+ debug!(" removing extra old children");
198+ debug_assert!(new_children.next().is_none());
198 if !pushed {
199 if !pushed {
199 self.change_list.emit_push_first_child();
200 self.change_list.emit_push_first_child();
200− pushed = true;
201+ } else {
202+ self.change_list.emit_pop_push_next_sibling();
201 }
203 }
202 self.change_list.emit_remove_self_and_next_siblings();
204 self.change_list.emit_remove_self_and_next_siblings();
203− }
205+ pushed = false;
204−
206+ } else {
205− debug!(" creating new children");
207+ debug!(" creating new children");
206−
207− for (i, new_child) in new_children.enumerate() {
208+ for (i, new_child) in new_children.enumerate() {
208− if i == 0 && pushed {
209+ if i == 0 && pushed {
209− self.change_list.emit_pop();
210+ self.change_list.emit_pop();
210− pushed = false;
211+ pushed = false;
212+ }
213+ self.create(new_child.clone());
214+ self.change_list.emit_append_child();
211 }
215 }
212− self.create(new_child.clone());
213− self.change_list.emit_append_child();
214 }
216 }
215
217
216− // TODO FITZGEN: only if we pushed?
217 debug!(" done updating children");
218 debug!(" done updating children");
218 if pushed {
219 if pushed {
219 self.change_list.emit_pop();
220 self.change_list.emit_pop();
@@ -221,7 +222,6 @@ impl Vdom {
221 }
222 }
222
223
223 fn create(&self, node: Node) {
224 fn create(&self, node: Node) {
224− // debug!("dodrio::Vdom::create({:#?})", node);
225 match node {
225 match node {
226 Node::Text(TextNode { text }) => {
226 Node::Text(TextNode { text }) => {
227 self.change_list.emit_create_text_node(text);
227 self.change_list.emit_create_text_node(text);
tests/web.rs+313−43
@@ -56,18 +56,27 @@ fn assert_rendered<R: Render>(container: &web_sys::Element, r: &R) {
56 }
56 }
57
57
58 fn check_node(actual: &web_sys::Node, expected: &Node) {
58 fn check_node(actual: &web_sys::Node, expected: &Node) {
59− info!("check_render:");
59+ debug!("check_render:");
60− info!(" actual = {}", stringify_actual_node(&actual));
60+ debug!(" actual = {}", stringify_actual_node(&actual));
61− info!(" expected = {:?}", expected);
61+ debug!(" expected = {:#?}", expected);
62 match expected {
62 match expected {
63 Node::Text(text_node) => {
63 Node::Text(text_node) => {
64+ assert_eq!(
64− assert_eq!(actual.node_name().to_uppercase(), "#TEXT");
65+ actual.node_name().to_uppercase(),
66+ "#TEXT",
67+ "actual.node_name() == #TEXT"
68+ );
69+ assert_eq!(
65− assert_eq!(actual.text_content().unwrap_or_default(), text_node.text());
70+ actual.text_content().unwrap_or_default(),
71+ text_node.text(),
72+ "actual.text_content() == expected.text()"
73+ );
66 }
74 }
67 Node::Element(elem) => {
75 Node::Element(elem) => {
68 assert_eq!(
76 assert_eq!(
69 actual.node_name().to_uppercase(),
77 actual.node_name().to_uppercase(),
70− elem.tag_name().to_uppercase()
78+ elem.tag_name().to_uppercase(),
79+ "actual.node_name() == expected.tag_name()"
71 );
80 );
72 let actual = actual
81 let actual = actual
73 .dyn_ref::<web_sys::Element>()
82 .dyn_ref::<web_sys::Element>()
@@ -79,17 +88,30 @@ fn assert_rendered<R: Render>(container: &web_sys::Element, r: &R) {
79 }
88 }
80
89
81 fn check_attributes(actual: web_sys::NamedNodeMap, expected: &[Attribute]) {
90 fn check_attributes(actual: web_sys::NamedNodeMap, expected: &[Attribute]) {
91+ assert_eq!(
92+ actual.length(),
82− assert_eq!(actual.length(), expected.len() as u32);
93+ expected.len() as u32,
94+ "actual's number of attributes == expected's number of attributes"
95+ );
83 for attr in expected {
96 for attr in expected {
84 let actual_attr = actual
97 let actual_attr = actual
85 .get_named_item(attr.name)
98 .get_named_item(attr.name)
86 .expect(&format!("should have attribute \"{}\"", attr.name));
99 .expect(&format!("should have attribute \"{}\"", attr.name));
100+ assert_eq!(
87− assert_eq!(actual_attr.value(), attr.value);
101+ actual_attr.value(),
102+ attr.value,
103+ "actual attr value == expected attr value for attr \"{}\"",
104+ attr.name
105+ );
88 }
106 }
89 }
107 }
90
108
91 fn check_children(actual: web_sys::NodeList, expected: &[Node]) {
109 fn check_children(actual: web_sys::NodeList, expected: &[Node]) {
110+ assert_eq!(
111+ actual.length(),
92− assert_eq!(actual.length(), expected.len() as u32);
112+ expected.len() as u32,
113+ "actual children length == expected children length"
114+ );
93 for (i, child) in expected.iter().enumerate() {
115 for (i, child) in expected.iter().enumerate() {
94 let actual_child = actual.item(i as u32).unwrap();
116 let actual_child = actual.item(i as u32).unwrap();
95 check_node(&actual_child, child);
117 check_node(&actual_child, child);
@@ -97,49 +119,297 @@ fn assert_rendered<R: Render>(container: &web_sys::Element, r: &R) {
97 }
119 }
98}
120}
99
121
100−#[wasm_bindgen_test]
101−fn render_initial_text() {
102− struct Hello;
122+struct RenderFn<F>(F)
123+where
124+ F: for<'bump> Fn(&'bump Bump) -> Node<'bump>;
103
125
104− impl Render for Hello {
126+impl<F> Render for RenderFn<F>
127+where
128+ F: for<'bump> Fn(&'bump Bump) -> Node<'bump>,
129+{
105− fn render<'a, 'bump>(&'a self, _bump: &'bump Bump) -> Node<'bump>
130+ fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> Node<'bump>
106− where
131+ where
107− 'a: 'bump,
132+ 'a: 'bump,
108− {
133+ {
109− Node::text("Hello")
134+ (self.0)(bump)
110− }
111 }
135 }
136+}
137+
138+#[wasm_bindgen_test]
139+fn render_initial_text() {
140+ let hello = RenderFn(|_bump| Node::text("hello"));
112
141
113 let container = create_element("div");
142 let container = create_element("div");
114− Vdom::new(&container, &Hello);
143+ Vdom::new(&container, &hello);
115− assert_rendered(&container, &Hello);
144+ assert_rendered(&container, &hello);
116}
145}
117
146
118#[wasm_bindgen_test]
147#[wasm_bindgen_test]
119fn render_initial_node() {
148fn render_initial_node() {
120− struct Hello;
149+ let hello = RenderFn(|bump| {
121−
122− impl Render for Hello {
123− fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> Node<'bump>
124− where
125− 'a: 'bump,
126− {
127− Node::element(
150+ Node::element(
128− bump,
151+ bump,
129− "div",
152+ "div",
130− [Attribute {
153+ [Attribute {
131− name: "id",
154+ name: "id",
132− value: "hello-world",
155+ value: "hello-world",
133− }],
156+ }],
134− [
157+ [
135− Node::text("Hello "),
158+ Node::text("Hello "),
136− Node::element(bump, "span", [], [Node::text("World!")]),
159+ Node::element(bump, "span", [], [Node::text("World!")]),
137− ],
160+ ],
138− )
161+ )
162+ });
163+
164+ let container = create_element("div");
165+ Vdom::new(&container, &hello);
166+ assert_rendered(&container, &hello);
167+}
168+
169+fn assert_before_after<R, S>(before: R, after: S)
170+where
171+ R: Render,
172+ S: Render,
173+{
174+ let container = create_element("div");
175+
176+ debug!("====== Rendering the *before* DOM into the physical DOM ======");
177+ let mut vdom = Vdom::new(&container, &before);
178+ debug!("====== Checking the *before* DOM against the physical DOM ======");
179+ assert_rendered(&container, &before);
180+
181+ debug!("====== Rendering the *after* DOM into the physical DOM ======");
182+ vdom.render(&after);
183+ debug!("====== Checking the *after* DOM against the physical DOM ======");
184+ assert_rendered(&container, &after);
185+}
186+
187+macro_rules! before_after {
188+ ( $(
189+ $name:ident {
190+ before($before_bump:ident) {
191+ $( $before:tt )*
192+ }
193+ after($after_bump:ident) {
194+ $( $after:tt )*
195+ }
139 }
196 }
197+ )* ) => {
198+ $(
199+ #[wasm_bindgen_test]
200+ fn $name() {
201+ assert_before_after(
202+ RenderFn(|$before_bump| { $( $before )* }),
203+ RenderFn(|$after_bump| { $( $after )* })
204+ );
205+ }
206+ )*
140 }
207 }
208+}
141
209
142− let container = create_element("div");
210+before_after! {
143− Vdom::new(&container, &Hello);
211+ same_text {
144− assert_rendered(&container, &Hello);
212+ before(_bump) {
213+ Node::text("hello")
214+ }
215+ after(_bump) {
216+ Node::text("hello")
217+ }
218+ }
219+
220+ update_text {
221+ before(_bump) {
222+ Node::text("before")
223+ }
224+ after(_bump) {
225+ Node::text("after")
226+ }
227+ }
228+
229+ replace_text_with_elem {
230+ before(_bump) {
231+ Node::text("before")
232+ }
233+ after(bump) {
234+ Node::element(bump, "div", [], [])
235+ }
236+ }
237+
238+ replace_elem_with_text {
239+ before(bump) {
240+ Node::element(bump, "div", [], [])
241+ }
242+ after(_bump) {
243+ Node::text("before")
244+ }
245+ }
246+
247+ same_elem {
248+ before(bump) {
249+ Node::element(bump, "div", [], [])
250+ }
251+ after(bump) {
252+ Node::element(bump, "div", [], [])
253+ }
254+ }
255+
256+ elems_with_different_tag_names {
257+ before(bump) {
258+ Node::element(bump, "span", [], [])
259+ }
260+ after(bump) {
261+ Node::element(bump, "div", [], [])
262+ }
263+ }
264+
265+ same_tag_name_update_attribute {
266+ before(bump) {
267+ Node::element(bump, "div", [Attribute { name: "value", value: "1" }], [])
268+ }
269+ after(bump) {
270+ Node::element(bump, "div", [Attribute { name: "value", value: "2" }], [])
271+ }
272+ }
273+
274+ same_tag_name_remove_attribute {
275+ before(bump) {
276+ Node::element(bump, "div", [Attribute { name: "value", value: "1" }], [])
277+ }
278+ after(bump) {
279+ Node::element(bump, "div", [], [])
280+ }
281+ }
282+
283+ same_tag_name_add_attribute {
284+ before(bump) {
285+ Node::element(bump, "div", [], [])
286+ }
287+ after(bump) {
288+ Node::element(bump, "div", [Attribute { name: "value", value: "2" }], [])
289+ }
290+ }
291+
292+ same_tag_name_many_attributes {
293+ before(bump) {
294+ Node::element(bump, "div", [
295+ Attribute { name: "before-1", value: "1" },
296+ Attribute { name: "shared-1", value: "1" },
297+ Attribute { name: "modified-1", value: "1" },
298+ Attribute { name: "before-2", value: "2" },
299+ Attribute { name: "shared-2", value: "2" },
300+ Attribute { name: "modified-2", value: "2" },
301+ Attribute { name: "before-3", value: "3" },
302+ Attribute { name: "shared-3", value: "3" },
303+ Attribute { name: "modified-3", value: "3" },
304+ ], [])
305+ }
306+ after(bump) {
307+ Node::element(bump, "div", [
308+ Attribute { name: "after-1", value: "1" },
309+ Attribute { name: "shared-1", value: "1" },
310+ Attribute { name: "modified-1", value: "100" },
311+ Attribute { name: "after-2", value: "2" },
312+ Attribute { name: "shared-2", value: "2" },
313+ Attribute { name: "modified-2", value: "200" },
314+ Attribute { name: "after-3", value: "3" },
315+ Attribute { name: "shared-3", value: "3" },
316+ Attribute { name: "modified-3", value: "300" },
317+ ], [])
318+ }
319+ }
320+
321+ same_tag_same_children {
322+ before(bump) {
323+ Node::element(bump, "div", [], [
324+ Node::text("child")
325+ ])
326+ }
327+ after(bump) {
328+ Node::element(bump, "div", [], [
329+ Node::text("child")
330+ ])
331+ }
332+ }
333+
334+ same_tag_update_child {
335+ before(bump) {
336+ Node::element(bump, "div", [], [
337+ Node::text("before")
338+ ])
339+ }
340+ after(bump) {
341+ Node::element(bump, "div", [], [
342+ Node::text("after")
343+ ])
344+ }
345+ }
346+
347+ same_tag_add_child {
348+ before(bump) {
349+ Node::element(bump, "div", [], [])
350+ }
351+ after(bump) {
352+ Node::element(bump, "div", [], [
353+ Node::text("child")
354+ ])
355+ }
356+ }
357+
358+ same_tag_remove_child {
359+ before(bump) {
360+ Node::element(bump, "div", [], [
361+ Node::text("child")
362+ ])
363+ }
364+ after(bump) {
365+ Node::element(bump, "div", [], [])
366+ }
367+ }
368+
369+ same_tag_update_many_children {
370+ before(bump) {
371+ Node::element(bump, "div", [], [
372+ Node::element(bump, "div", [], []),
373+ Node::element(bump, "span", [], []),
374+ Node::element(bump, "p", [], []),
375+ ])
376+ }
377+ after(bump) {
378+ Node::element(bump, "div", [], [
379+ Node::element(bump, "span", [], []),
380+ Node::element(bump, "p", [], []),
381+ Node::element(bump, "div", [], []),
382+ ])
383+ }
384+ }
385+
386+ same_tag_remove_many_children {
387+ before(bump) {
388+ Node::element(bump, "div", [], [
389+ Node::element(bump, "div", [], []),
390+ Node::element(bump, "span", [], []),
391+ Node::element(bump, "p", [], []),
392+ ])
393+ }
394+ after(bump) {
395+ Node::element(bump, "div", [], [
396+ Node::element(bump, "div", [], []),
397+ ])
398+ }
399+ }
400+
401+ same_tag_add_many_children {
402+ before(bump) {
403+ Node::element(bump, "div", [], [
404+ Node::element(bump, "div", [], []),
405+ ])
406+ }
407+ after(bump) {
408+ Node::element(bump, "div", [], [
409+ Node::element(bump, "div", [], []),
410+ Node::element(bump, "span", [], []),
411+ Node::element(bump, "p", [], []),
412+ ])
413+ }
414+ }
145}
415}