| 404 | |
| 405 | impl 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 | |
| 421 | impl FormatterOutput for InstructionFormatterOutput<'_> { |