Skip to content

Commit ea422ca

Browse files
committed
Fix clippy issues
1 parent 18760c9 commit ea422ca

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/ansi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ mod tests {
314314

315315
fn _check_all_strings_of_len(len: usize, chunk: &mut Vec<u8>) {
316316
if len == 0 {
317-
if let Ok(s) = std::str::from_utf8(chunk) {
317+
if let Ok(s) = core::str::from_utf8(chunk) {
318318
let old_matches: Vec<_> = STRIP_ANSI_RE.find_iter(s).collect();
319319
let new_matches: Vec<_> = Matches::new(s).collect();
320320
assert_eq!(old_matches, new_matches);

src/unix_term.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
use core::{fmt::Display, mem, str};
2+
#[cfg(target_os = "macos")]
3+
use core::ptr;
24
use std::env;
35
use std::fs;
46
use std::io::{self, BufRead, BufReader};
@@ -163,7 +165,7 @@ fn select_fd(fd: RawFd, timeout: i32) -> io::Result<bool> {
163165

164166
let mut timeout_val;
165167
let timeout = if timeout < 0 {
166-
std::ptr::null_mut()
168+
ptr::null_mut()
167169
} else {
168170
timeout_val = libc::timeval {
169171
tv_sec: (timeout / 1000) as _,
@@ -177,8 +179,8 @@ fn select_fd(fd: RawFd, timeout: i32) -> io::Result<bool> {
177179
let ret = libc::select(
178180
fd + 1,
179181
&mut read_fd_set,
180-
std::ptr::null_mut(),
181-
std::ptr::null_mut(),
182+
ptr::null_mut(),
183+
ptr::null_mut(),
182184
timeout,
183185
);
184186
if ret < 0 {

0 commit comments

Comments
 (0)