-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ToView manually for types #541
Conversation
This also allows us to implement ToView for Option<T> and [T] where T: ToView among other types
Codecov ReportBase: 63.21% // Head: 63.24% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #541 +/- ##
==========================================
+ Coverage 63.21% 63.24% +0.03%
==========================================
Files 54 54
Lines 8965 8944 -21
==========================================
- Hits 5667 5657 -10
+ Misses 3298 3287 -11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Benchmark Report
@@ Performance Diff @@
## | wasm-bindgen | baseline | update | diff ##
##########################################################################
+ 01_run1k | 103.85 | 125.37 | 117.93 | -5.93%
+ 02_replace1k | 108.77 | 144.71 | 130.36 | -9.92%
+ 03_update10th1k_x16 | 222.21 | 273.56 | 244.82 | -10.51%
+ 04_select1k | 24.35 | 32.63 | 26.21 | -19.66%
05_swap1k | 62.24 | 68.70 | 68.35 | -0.50%
06_remove-one-1k | 110.91 | 117.67 | 120.23 | +2.18%
07_create10k | 1071.53 | 1292.23 | 1313.63 | +1.66%
08_create1k-after1k_x2 | 240.80 | 269.17 | 273.40 | +1.57%
- 09_clear1k_x8 | 65.02 | 87.41 | 90.86 | +3.95%
21_ready-memory | 1.86 | 1.85 | 1.85 | -0.03%
22_run-memory | 2.84 | 5.54 | 5.55 | +0.16%
23_update5-memory | 3.00 | 5.70 | 5.70 | +0.08%
25_run-clear-memory | 1.92 | 4.35 | 4.36 | +0.18%
26_run-10k-memory | 13.34 | 39.73 | 39.74 | +0.02%
- 31_startup-ci | 1832.45 | 1967.08 | 2032.26 | +3.31%
32_startup-bt | 0.00 | 0.00 | 0.00 | NaN%
+ 33_startup-mainthreadcost | 18.06 | 14.36 | 9.31 | -35.17%
34_startup-totalbytes | 189.33 | 304.26 | 302.60 | -0.55% Workflow: 3666643752 |
This lets us do some nice things such as:
Breaking Changes:
IntoView
renamed toToView
(which is more idiomatic in Rust)IntoView::create
renamed toToView::to_view
Display
now implementToView
. For those types that used to implementIntoView
but do not now implementToView
, a simple fix would be to just add ato_string()
at the call-site.