Skip to content

Commit

Permalink
Fix the impl for Displaying zero element in Fp (arkworks-rs#806)
Browse files Browse the repository at this point in the history
* Fix the impl for `Display`ing zero element in Fp

* Update changelog

---------

Co-authored-by: Marcin <marcin.gorny.94@protonmail.com>
  • Loading branch information
winderica and mmagician authored Apr 6, 2024
1 parent a9b2dea commit 97c7a4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

- [\#747](https://github.com/arkworks-rs/algebra/pull/747) (`ark-ff-macros`) Fix fetching attributes in `MontConfig` macro.
- [\#803](https://github.com/arkworks-rs/algebra/pull/803) (`ark-ec`, `ark-test-template`) Fix incorrect decomposition in GLV.
- [\#806](https://github.com/arkworks-rs/algebra/pull/806) (`ark-ff`) Fix the impl for `Display`ing zero element in Fp.

## v0.4.2

Expand Down
2 changes: 1 addition & 1 deletion ff/src/fields/models/fp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ impl<P: FpConfig<N>, const N: usize> Display for Fp<P, N> {
#[inline]
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
let string = self.into_bigint().to_string();
write!(f, "{}", string.trim_start_matches('0'))
write!(f, "{}", string)
}
}

Expand Down

0 comments on commit 97c7a4f

Please sign in to comment.