Skip to content

Commit 9d6ca8c

Browse files
committed
Remove function from Debug impl of MediumLevelILLiftedInstruction in Rust API
Causing unneeded noise in the debug print
1 parent 6866a43 commit 9d6ca8c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

rust/src/medium_level_il/lift.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use std::collections::BTreeMap;
2-
31
use super::operation::*;
42
use super::{MediumLevelILFunction, MediumLevelInstructionIndex};
53
use crate::architecture::CoreIntrinsic;
64
use crate::rc::Ref;
75
use crate::variable::{ConstantData, SSAVariable, Variable};
6+
use std::collections::BTreeMap;
7+
use std::fmt::{Debug, Formatter};
88

99
#[derive(Clone)]
1010
pub enum MediumLevelILLiftedOperand {
@@ -23,7 +23,7 @@ pub enum MediumLevelILLiftedOperand {
2323
InstructionIndex(MediumLevelInstructionIndex),
2424
}
2525

26-
#[derive(Clone, Debug, PartialEq)]
26+
#[derive(Clone, PartialEq)]
2727
pub struct MediumLevelILLiftedInstruction {
2828
pub function: Ref<MediumLevelILFunction>,
2929
pub address: u64,
@@ -32,6 +32,17 @@ pub struct MediumLevelILLiftedInstruction {
3232
pub kind: MediumLevelILLiftedInstructionKind,
3333
}
3434

35+
impl Debug for MediumLevelILLiftedInstruction {
36+
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
37+
f.debug_struct("MediumLevelILLiftedInstruction")
38+
.field("address", &self.address)
39+
.field("index", &self.index)
40+
.field("size", &self.size)
41+
.field("kind", &self.kind)
42+
.finish()
43+
}
44+
}
45+
3546
#[derive(Clone, Debug, PartialEq)]
3647
pub enum MediumLevelILLiftedInstructionKind {
3748
Nop,

0 commit comments

Comments
 (0)