Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
grasshopper47 committed Nov 25, 2023
1 parent fa5bb13 commit 265af8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/noirc_printable_type/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ fn to_string(value: &PrintableValue, typ: &PrintableType) -> Option<String> {
}
(PrintableValue::Field(f), PrintableType::SignedInteger { width }) => {
let mut uint = f.to_u128(); // Interpret as uint
if (uint >> (width - 1)) == 1 { // Extract sign relative to width of input

// Extract sign relative to width of input
if (uint >> (width - 1)) == 1 {
output.push('-');
uint = (uint ^ ((1 << width) - 1)) + 1; // Two's complement relative to width of input
}
Expand Down

0 comments on commit 265af8b

Please sign in to comment.