Skip to content

Commit dc6423a

Browse files
removed some dynamic allocations added since this MR was opened.
formatting.
1 parent a479042 commit dc6423a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

mythril/src/error.rs

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ pub enum Error {
8484
InvalidDevice,
8585
NotImplemented,
8686
DeviceError,
87+
MissingDevice,
8788
}
8889

8990
impl<T: TryFromPrimitive> From<TryFromPrimitiveError<T>> for Error {

mythril/src/vm.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,10 @@ impl VirtualMachine {
548548
// Just ignore writes to unknown ports
549549
Ok(())
550550
}
551-
_ => Err(Error::MissingDevice(
552-
"Unable to dispatch event".into(),
553-
)),
551+
_ => {
552+
error!("Unable to dispatch event");
553+
Err(Error::MissingDevice)
554+
}
554555
};
555556
}
556557
};

0 commit comments

Comments
 (0)