Skip to content

Commit

Permalink
Fix clippy::precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyBF committed Jan 5, 2025
1 parent 23188a1 commit e82768b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ext/crates/algebra/src/algebra/milnor_algebra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ impl MilnorAlgebra {
// Now put everything together
let m = MilnorBasisElement {
p_part: new_p,
q_part: term.q_part | 1 << (k + i as u32),
q_part: term.q_part | (1 << (k + i as u32)),
degree: 0, // we don't really care about the degree here. The final degree of the whole calculation is known a priori
};
let c = if larger_q % 2 == 0 {
Expand Down Expand Up @@ -1588,7 +1588,7 @@ impl MilnorAlgebra {
});

let second_idx = self.basis_element_to_index(&MilnorBasisElement {
q_part: basis.q_part ^ 1 << i,
q_part: basis.q_part ^ (1 << i),
p_part: basis.p_part.clone(),
degree: second_degree,
});
Expand Down
2 changes: 1 addition & 1 deletion ext/crates/fp/src/field/smallfq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl<P: Prime> FieldInternal for SmallFq<P> {

/// This is 2n + 1 if `element` is a^n, and 0 otherwise.
fn encode(self, element: FieldElement<Self>) -> Limb {
element.value.0.map(|x| (x as Limb) << 1 | 1).unwrap_or(0)
element.value.0.map(|x| ((x as Limb) << 1) | 1).unwrap_or(0)
}

fn decode(self, element: Limb) -> FieldElement<Self> {
Expand Down

0 comments on commit e82768b

Please sign in to comment.