Skip to content

Commit cd1a6b4

Browse files
committed
Fix clippy lints
1 parent 047fea2 commit cd1a6b4

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/unix_term.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn terminal_size(out: &Term) -> Option<(u16, u16)> {
5656
#[allow(clippy::useless_conversion)]
5757
libc::ioctl(out.as_raw_fd(), libc::TIOCGWINSZ.into(), &mut winsize);
5858
if winsize.ws_row > 0 && winsize.ws_col > 0 {
59-
Some((winsize.ws_row as u16, winsize.ws_col as u16))
59+
Some((winsize.ws_row, winsize.ws_col))
6060
} else {
6161
None
6262
}

src/utils.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ use crate::term::{wants_emoji, Term};
1111
#[cfg(feature = "ansi-parsing")]
1212
use crate::ansi::AnsiCodeIterator;
1313

14-
#[cfg(not(feature = "ansi-parsing"))]
15-
fn strip_ansi_codes(s: &str) -> &str {
16-
s
17-
}
18-
1914
fn default_colors_enabled(out: &Term) -> bool {
2015
(out.features().colors_supported()
2116
&& &env::var("CLICOLOR").unwrap_or_else(|_| "1".into()) != "0")

0 commit comments

Comments
 (0)