mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
style: use unwrap or default (#4169)
This commit is contained in:
@ -289,10 +289,7 @@ impl ParityTraceBuilder {
|
||||
///
|
||||
/// does not have the code fields filled in
|
||||
pub fn vm_trace(&self) -> VmTrace {
|
||||
match self.nodes.get(0) {
|
||||
Some(current) => self.make_vm_trace(current),
|
||||
None => VmTrace { code: Default::default(), ops: Vec::new() },
|
||||
}
|
||||
self.nodes.first().map(|node| self.make_vm_trace(node)).unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Returns a VM trace without the code filled in
|
||||
|
||||
@ -279,7 +279,7 @@ pub struct LocalizedTransactionTrace {
|
||||
}
|
||||
|
||||
/// A record of a full VM trace for a CALL/CREATE.
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct VmTrace {
|
||||
/// The code to be executed.
|
||||
|
||||
Reference in New Issue
Block a user