Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-dupre committed Feb 7, 2024
1 parent 047fea2 commit cd1a6b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/unix_term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn terminal_size(out: &Term) -> Option<(u16, u16)> {
#[allow(clippy::useless_conversion)]
libc::ioctl(out.as_raw_fd(), libc::TIOCGWINSZ.into(), &mut winsize);
if winsize.ws_row > 0 && winsize.ws_col > 0 {
Some((winsize.ws_row as u16, winsize.ws_col as u16))
Some((winsize.ws_row, winsize.ws_col))
} else {
None
}
Expand Down
5 changes: 0 additions & 5 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ use crate::term::{wants_emoji, Term};
#[cfg(feature = "ansi-parsing")]
use crate::ansi::AnsiCodeIterator;

#[cfg(not(feature = "ansi-parsing"))]
fn strip_ansi_codes(s: &str) -> &str {
s
}

fn default_colors_enabled(out: &Term) -> bool {
(out.features().colors_supported()
&& &env::var("CLICOLOR").unwrap_or_else(|_| "1".into()) != "0")
Expand Down

0 comments on commit cd1a6b4

Please sign in to comment.