fix some warnings on windows
This commit is contained in:
1 parent
84007274cf
commit
37d2b04af6
2 files changed
+7
-1
No files matched your search
@@ -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
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user