Skip to content

Commit

Permalink
Fix clippy warning about operator precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanvanSchaik authored and J-F-Liu committed Feb 23, 2025
1 parent de50c1f commit 1f2cf32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/toc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl Document {
let t16: Vec<u16> = title
.chunks(2)
.skip(1)
.map(|x| (x[0] as u16) << 8 | x[1] as u16)
.map(|x| ((x[0] as u16) << 8) | x[1] as u16)
.collect();
s = String::from_utf16_lossy(&t16);
} else if title[0] == 0xff && title[1] == 0xfe {
Expand All @@ -128,7 +128,7 @@ impl Document {
let t16: Vec<u16> = title
.chunks(2)
.skip(1)
.map(|x| (x[1] as u16) << 8 | x[0] as u16)
.map(|x| ((x[1] as u16) << 8) | x[0] as u16)
.collect();
s = String::from_utf16_lossy(&t16);
} else {
Expand Down

0 comments on commit 1f2cf32

Please sign in to comment.