mirror of
https://github.com/pezkuwichain/bizinikiwi-bn.git
synced 2026-04-22 03:17:57 +00:00
add set_bit for fr
This commit is contained in:
@@ -98,6 +98,10 @@ macro_rules! field_impl {
|
||||
pub fn raw(&self) -> &U256 {
|
||||
&self.0
|
||||
}
|
||||
|
||||
pub fn set_bit(&mut self, bit: usize, to: bool) {
|
||||
self.0.set_bit(bit, to);
|
||||
}
|
||||
}
|
||||
|
||||
impl FieldElement for $name {
|
||||
|
||||
@@ -65,6 +65,9 @@ impl Fr {
|
||||
pub fn into_u256(self) -> arith::U256 {
|
||||
(self.0).into()
|
||||
}
|
||||
pub fn set_bit(&mut self, bit: usize, to: bool) {
|
||||
self.0.set_bit(bit, to);
|
||||
}
|
||||
}
|
||||
|
||||
impl Add<Fr> for Fr {
|
||||
|
||||
Reference in New Issue
Block a user