Fix clippy lint (operator precedence) (#976)

This commit is contained in:
Johannes Agricola 2025-03-16 02:33:50 +01:00 committed by GitHub
parent 12f36ec316
commit cb08b4db7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -190,7 +190,9 @@ impl ScreenBufferCursor {
fn save_position(&self) -> std::io::Result<()> {
let position = self.position()?;
let bits = u64::from(u32::from(position.x as u16) << 16 | u32::from(position.y as u16));
let upper = u32::from(position.x as u16) << 16;
let lower = u32::from(position.y as u16);
let bits = u64::from(upper | lower);
SAVED_CURSOR_POS.store(bits, Ordering::Relaxed);
Ok(())