* Remove unnecessary references

* Shorten expressions

* Remove unnecessary reference

* Simplify expression

* Fix formatting
This commit is contained in:
Chevdor
2021-07-27 15:14:55 +02:00
committed by GitHub
parent a0b548b37d
commit cb023973e8
7 changed files with 25 additions and 37 deletions
+1 -5
View File
@@ -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)
}
}