Skip to content

Commit 4555bfa

Browse files
committed
Clean up some issues pointed out by Clippy
1 parent 4a0f8db commit 4555bfa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/posix/poll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn wait_fd(fd: RawFd, events: PollFlags, timeout: Duration) -> io::Result<()> {
4848
Some(_) | None => (),
4949
}
5050

51-
Err(io::Error::new(io::ErrorKind::Other, EIO.desc()))
51+
Err(io::Error::other(EIO.desc()))
5252
}
5353

5454
/// Poll with a duration clamped to the maximum value representable by the `TimeSpec` used by

src/posix/tty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ impl io::Write for TTYPort {
500500
))
501501
}
502502
}
503-
Err(_) => Err(io::Error::new(io::ErrorKind::Other, "flush failed")),
503+
Err(_) => Err(io::Error::other("flush failed")),
504504
};
505505
}
506506
}

src/windows/com.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl COMPort {
4646
/// ## Errors
4747
///
4848
/// * `NoDevice` if the device could not be opened. This could indicate that
49-
/// the device is already in use.
49+
/// the device is already in use.
5050
/// * `InvalidInput` if `port` is not a valid device name.
5151
/// * `Io` for any other I/O error while opening or initializing the device.
5252
pub fn open(builder: &SerialPortBuilder) -> Result<COMPort> {

0 commit comments

Comments
 (0)