Skip to content

Commit

Permalink
-, not _
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Jan 23, 2022
1 parent 60af6ab commit 03250f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/yew-macro/src/typed_vdom/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ impl AttributePropDefinition {
format_ident!("r#{}", self.name)
}
fn build_if_lets(&self) -> TokenStream {
let name = self.name();
let ident = self.name();
let name = self.name.to_string().replace('_', "-");
quote! {
if let Some(val) = self.#name {
if let Some(val) = self.#ident {
attrs.insert(::std::stringify!(#name), val);
}
}
Expand Down

1 comment on commit 03250f2

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yew master branch benchmarks (Lower is better)

Benchmark suite Current: 03250f2 Previous: 38021e3 Ratio
yew-struct-keyed 01_run1k 196.818 234.656 0.84
yew-struct-keyed 02_replace1k 200.349 237.4175 0.84
yew-struct-keyed 03_update10th1k_x16 431.768 394.1925 1.10
yew-struct-keyed 04_select1k 95.637 75.9405 1.26
yew-struct-keyed 05_swap1k 116.0625 107.9565 1.08
yew-struct-keyed 06_remove-one-1k 34.5865 34.7085 1.00
yew-struct-keyed 07_create10k 2087.706 2313.8295 0.90
yew-struct-keyed 08_create1k-after1k_x2 408.5215 447.7525 0.91
yew-struct-keyed 09_clear1k_x8 202.4915 217.9425 0.93
yew-struct-keyed 21_ready-memory 0.9634513854980468 0.9634513854980468 1
yew-struct-keyed 22_run-memory 1.50372314453125 1.4999732971191406 1.00
yew-struct-keyed 23_update5-memory 1.5064430236816406 1.5032615661621094 1.00
yew-struct-keyed 24_run5-memory 1.510845184326172 1.510845184326172 1
yew-struct-keyed 25_run-clear-memory 1.1287879943847656 1.1258888244628906 1.00
yew-struct-keyed 31_startup-ci 1739.806 1886.865 0.92
yew-struct-keyed 32_startup-bt 31.817999999999987 39.49799999999999 0.81
yew-struct-keyed 34_startup-totalbytes 365.9482421875 365.94140625 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.