Skip to content

Conversation

@alexs-sh
Copy link
Contributor

@alexs-sh alexs-sh commented Sep 26, 2025

About

This is a minor fix that removes unused parentheses and helps avoid warnings during build or when running clippy. I noticed this while working on #1011

warning: unnecessary parentheses around closure body
  --> src/terminal/sys/unix.rs:87:50
   |
87 |     let file = File::open("/dev/tty").map(|file| (FileDesc::Owned(file.into())));
   |                                                  ^                            ^
   |
   = note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
   |
87 -     let file = File::open("/dev/tty").map(|file| (FileDesc::Owned(file.into())));
87 +     let file = File::open("/dev/tty").map(|file| FileDesc::Owned(file.into()));
   |

warning: `crossterm` (lib) generated 1 warning (run `cargo fix --lib -p crossterm` to apply 1 suggestion)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s

Versions

rustc --version
rustc 1.90.0 (1159e78c4 2025-09-14)

This is a minor fix that removes unused parentheses and helps avoid
warnings during build or when running 'clippy'.
@alexs-sh alexs-sh requested a review from TimonPost as a code owner September 26, 2025 08:13
@joshka joshka merged commit a426737 into crossterm-rs:master Nov 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants