fix some warnings on windows

This commit is contained in:
Wez Furlong committed 2022-03-18 10:29:01 -07:00
1 parent 84007274cf
commit 37d2b04af6
2 files changed
+7 -1

No files matched your search

+5
View File
@@ -25,6 +25,11 @@ pub fn set_sticky_bit(path: &Path) {
let _ = std::fs::set_permissions(&path, perms);
}
}
#[cfg(windows)]
{
let _ = path;
}
}
fn open_log(path: PathBuf) -> anyhow::Result<File> {
+2 -1
View File
@@ -10,7 +10,7 @@ use crate::{
SlavePty,
};
use anyhow::{ensure, Context};
use filedescriptor::{poll, pollfd, AsRawSocketDescriptor, FileDescriptor, POLLIN};
use filedescriptor::FileDescriptor;
use serial::{
BaudRate, CharSize, FlowControl, Parity, PortSettings, SerialPort, StopBits, SystemPort,
};
@@ -241,6 +241,7 @@ impl Read for Reader {
loop {
#[cfg(unix)]
{
use filedescriptor::{poll, pollfd, AsRawSocketDescriptor, POLLIN};
// The serial crate puts the serial port in non-blocking mode,
// so we must explicitly poll for ourselves here to avoid a
// busy loop.