Skip to content

Commit 5c097ce

Browse files
committed
Adds new_with_addr initializer to DisassemblyTextLine
1 parent 45f24b6 commit 5c097ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

rust/src/disassembly.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ impl DisassemblyTextLine {
142142
..Default::default()
143143
}
144144
}
145+
146+
pub fn new_with_addr(tokens: Vec<InstructionTextToken>, addr: u64) -> Self {
147+
Self {
148+
address: addr,
149+
tokens,
150+
..Default::default()
151+
}
152+
}
145153
}
146154

147155
impl From<&str> for DisassemblyTextLine {

0 commit comments

Comments
 (0)