MCPcopy Create free account
hub / github.com/encounter/objdiff / push_signed

Method push_signed

objdiff-core/src/arch/x86.rs:406–418  ·  view source on GitHub ↗
(&mut self, mut value: i64)

Source from the content-addressed store, hash-verified

404
405impl InstructionFormatterOutput<'_> {
406 fn push_signed(&mut self, mut value: i64) {
407 if self.error.is_some() {
408 return;
409 }
410 // The formatter writes the '-' operator and then gives us a negative value,
411 // so convert it to a positive value to avoid double negatives
412 if value < 0 {
413 value = value.wrapping_abs();
414 }
415 if let Err(e) = (self.cb)(InstructionPart::signed(value)) {
416 self.error = Some(e);
417 }
418 }
419}
420
421impl FormatterOutput for InstructionFormatterOutput<'_> {

Callers 1

write_numberMethod · 0.80

Calls 1

is_someMethod · 0.80

Tested by

no test coverage detected