summaryrefslogtreecommitdiff
path: root/src/sys/termios.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/termios.rs')
-rw-r--r--src/sys/termios.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sys/termios.rs b/src/sys/termios.rs
index b4bb3d85..4ff4e674 100644
--- a/src/sys/termios.rs
+++ b/src/sys/termios.rs
@@ -933,6 +933,8 @@ cfg_if!{
/// [cfgetispeed(3p)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/cfgetispeed.html)).
///
/// `cfgetispeed()` extracts the input baud rate from the given `Termios` structure.
+ // The cast is not unnecessary on all platforms.
+ #[allow(clippy::unnecessary_cast)]
pub fn cfgetispeed(termios: &Termios) -> u32 {
let inner_termios = termios.get_libc_termios();
unsafe { libc::cfgetispeed(&*inner_termios) as u32 }
@@ -942,6 +944,8 @@ cfg_if!{
/// [cfgetospeed(3p)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/cfgetospeed.html)).
///
/// `cfgetospeed()` extracts the output baud rate from the given `Termios` structure.
+ // The cast is not unnecessary on all platforms.
+ #[allow(clippy::unnecessary_cast)]
pub fn cfgetospeed(termios: &Termios) -> u32 {
let inner_termios = termios.get_libc_termios();
unsafe { libc::cfgetospeed(&*inner_termios) as u32 }