Skip to content

Commit

Permalink
Rename store to update
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Oct 11, 2020
1 parent 43231bb commit b09e6b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ impl<I: Id> DynamicModInt<I> {
if modulus == 0 {
panic!("the modulus must not be 0");
}
I::companion_barrett().store(modulus);
I::companion_barrett().update(modulus);
}

/// Creates a new `DynamicModInt`.
Expand Down Expand Up @@ -478,7 +478,7 @@ impl Barrett {
}

#[inline]
fn store(&self, m: u32) {
fn update(&self, m: u32) {
let im = (-1i64 as u64 / m as u64).wrapping_add(1);
self.m.store(m, atomic::Ordering::SeqCst);
self.im.store(im, atomic::Ordering::SeqCst);
Expand Down

0 comments on commit b09e6b5

Please sign in to comment.