mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-12 05:21:04 +00:00
Cleanup (#162)
* Remove unnecessary references * Shorten expressions * Remove unnecessary reference * Simplify expression * Fix formatting
This commit is contained in:
+1
-5
@@ -340,10 +340,6 @@ impl Rules for Set {
|
||||
}
|
||||
|
||||
fn memory_grow_cost(&self) -> Option<MemoryGrowCost> {
|
||||
if let Some(val) = NonZeroU32::new(self.grow) {
|
||||
Some(MemoryGrowCost::Linear(val))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
NonZeroU32::new(self.grow).map(MemoryGrowCost::Linear)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user