aboutsummaryrefslogtreecommitdiffstats
path: root/src/file_op.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2025-03-07 22:28:15 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2025-03-07 22:28:15 +0000
commite26a0bc0bc008777273aeec590bf87c9e11285f9 (patch)
treebb644c19bb70d0e3a80d3422eac0c55cc68ab3e8 /src/file_op.rs
parentFor directory size counting, ignore inodes we've seen before (diff)
downloadminiserve-e26a0bc0bc008777273aeec590bf87c9e11285f9.tar.gz
miniserve-e26a0bc0bc008777273aeec590bf87c9e11285f9.zip
Fix lints on Windows
Diffstat (limited to 'src/file_op.rs')
-rw-r--r--src/file_op.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file_op.rs b/src/file_op.rs
index 1db4672..5ae9c32 100644
--- a/src/file_op.rs
+++ b/src/file_op.rs
@@ -1,12 +1,16 @@
//! Handlers for file upload and removal
+#[cfg(target_family = "unix")]
use std::collections::HashSet;
+
use std::io::ErrorKind;
#[cfg(target_family = "unix")]
use std::os::unix::fs::MetadataExt;
use std::path::{Component, Path, PathBuf};
+
+#[cfg(target_family = "unix")]
use std::sync::Arc;
use actix_web::{HttpRequest, HttpResponse, http::header, web};
@@ -18,6 +22,8 @@ use sha2::digest::DynDigest;
use sha2::{Digest, Sha256, Sha512};
use tempfile::NamedTempFile;
use tokio::io::AsyncWriteExt;
+
+#[cfg(target_family = "unix")]
use tokio::sync::RwLock;
use crate::{