Skip to content

Commit cb08b4d

Browse files
authored
Fix clippy lint (operator precedence) (#976)
1 parent 12f36ec commit cb08b4d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cursor/sys/windows.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ impl ScreenBufferCursor {
190190
fn save_position(&self) -> std::io::Result<()> {
191191
let position = self.position()?;
192192

193-
let bits = u64::from(u32::from(position.x as u16) << 16 | u32::from(position.y as u16));
193+
let upper = u32::from(position.x as u16) << 16;
194+
let lower = u32::from(position.y as u16);
195+
let bits = u64::from(upper | lower);
194196
SAVED_CURSOR_POS.store(bits, Ordering::Relaxed);
195197

196198
Ok(())

0 commit comments

Comments
 (0)