Skip to content

Commit

Permalink
Use parenthesizing to avoid operator precedence confusiong
Browse files Browse the repository at this point in the history
Fixes a clippy lint
  • Loading branch information
badboy committed Jan 13, 2025
1 parent db9a5f2 commit dbddf83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions glean-core/src/lib_unit_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ fn correct_order() {
fn discriminant(metric: &metrics::Metric) -> u32 {
let ser = bincode::serialize(metric).unwrap();
(ser[0] as u32)
| (ser[1] as u32) << 8
| (ser[2] as u32) << 16
| (ser[3] as u32) << 24
| ((ser[1] as u32) << 8)
| ((ser[2] as u32) << 16)
| ((ser[3] as u32) << 24)
}

// One of every metric type. The values are arbitrary and don't matter.
Expand Down

0 comments on commit dbddf83

Please sign in to comment.