Skip to content

Commit 7f95607

Browse files
authored
Update weight-gen template.hbs (#844)
1 parent 740f0b8 commit 7f95607

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

weight-gen/src/template.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ impl<T: frame_system::Config> ModuleWeights<T> {
1313
{{#each benchmarks as |benchmark|}}
1414
// Storage access info
1515
//
16-
{{#each benchmark.comments as |c|}}
17-
// {{c}}
16+
{{#each benchmark.comments as |comment|}}
17+
// {{comment}}
1818
{{/each}}
1919
pub fn {{benchmark.name~}} () -> Weight {
20-
({{underscore benchmark.weight}} as Weight)
20+
Weight::from_ref_time({{underscore benchmark.weight}})
2121
{{#if (ne benchmark.reads 0)}}
22-
.saturating_add(T::DbWeight::get().reads({{benchmark.reads}} as Weight))
22+
.saturating_add(T::DbWeight::get().reads({{benchmark.reads}}))
2323
{{/if}}
2424
{{#if (ne benchmark.writes 0)}}
25-
.saturating_add(T::DbWeight::get().writes({{benchmark.writes}} as Weight))
25+
.saturating_add(T::DbWeight::get().writes({{benchmark.writes}}))
2626
{{/if}}
2727
}
2828
{{/each}}

0 commit comments

Comments
 (0)