From 1da562be1a5fe188a2a590cf9eb90e8688e60645 Mon Sep 17 00:00:00 2001 From: Alexander Shirokov Date: Fri, 26 Sep 2025 10:06:19 +0200 Subject: [PATCH 1/2] terminal:remove unused parentheses This is a minor fix that removes unused parentheses and helps avoid warnings during build or when running 'clippy'. --- src/terminal/sys/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal/sys/unix.rs b/src/terminal/sys/unix.rs index a9e9ec04..f9b7a75a 100644 --- a/src/terminal/sys/unix.rs +++ b/src/terminal/sys/unix.rs @@ -84,7 +84,7 @@ pub(crate) fn window_size() -> io::Result { #[cfg(not(feature = "libc"))] pub(crate) fn window_size() -> io::Result { - let file = File::open("/dev/tty").map(|file| (FileDesc::Owned(file.into()))); + let file = File::open("/dev/tty").map(|file| FileDesc::Owned(file.into())); let fd = if let Ok(file) = &file { file.as_fd() } else { From 802b6604261486ba68884d2b469cc31093c457ab Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Sun, 2 Nov 2025 22:57:27 -0800 Subject: [PATCH 2/2] Fix another similar problem --- src/terminal/sys/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal/sys/unix.rs b/src/terminal/sys/unix.rs index f9b7a75a..e7758264 100644 --- a/src/terminal/sys/unix.rs +++ b/src/terminal/sys/unix.rs @@ -67,7 +67,7 @@ pub(crate) fn window_size() -> io::Result { ws_ypixel: 0, }; - let file = File::open("/dev/tty").map(|file| (FileDesc::new(file.into_raw_fd(), true))); + let file = File::open("/dev/tty").map(|file| FileDesc::new(file.into_raw_fd(), true)); let fd = if let Ok(file) = &file { file.raw_fd() } else {