mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-14 08:41:09 +00:00
Address all clippy lints
These changes do not change the behaviour of the code and should be non-controversial.
This commit is contained in:
+2
-2
@@ -285,11 +285,11 @@ impl Default for Set {
|
||||
|
||||
impl Set {
|
||||
pub fn new(regular: u32, entries: Map<InstructionType, Metering>) -> Self {
|
||||
Set { regular: regular, entries: entries, grow: 0 }
|
||||
Set { regular, entries, grow: 0 }
|
||||
}
|
||||
|
||||
pub fn process(&self, instruction: &elements::Instruction) -> Result<u32, ()> {
|
||||
match self.entries.get(&InstructionType::op(instruction)).map(|x| *x) {
|
||||
match self.entries.get(&InstructionType::op(instruction)).cloned() {
|
||||
None | Some(Metering::Regular) => Ok(self.regular),
|
||||
Some(Metering::Forbidden) => Err(()),
|
||||
Some(Metering::Fixed(val)) => Ok(val),
|
||||
|
||||
Reference in New Issue
Block a user