Skip to content

Commit 5cec332

Browse files
silence dead code warnings for windows
1 parent 4bbc351 commit 5cec332

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/read/pipelining.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Pipelined extraction into a filesystem directory.
22
3+
#![cfg_attr(not(unix), allow(dead_code))]
4+
35
pub mod path_splitting {
46
use displaydoc::Display;
57
use thiserror::Error;
@@ -461,6 +463,7 @@ pub mod handle_creation {
461463
FSEntry::File(data) => {
462464
let key = ZipDataHandle::wrap(data);
463465

466+
#[cfg_attr(not(unix), allow(unused_variables))]
464467
if let Some(mode) = data.unix_mode() {
465468
/* TODO: consider handling the readonly bit on windows. We don't currently
466469
* do this in normal extraction, so we don't need to do this yet for
@@ -478,6 +481,7 @@ pub mod handle_creation {
478481
.open(path)?;
479482
assert!(file_handle_mapping.insert(key, handle).is_none());
480483
}
484+
#[cfg_attr(not(unix), allow(unused_variables))]
481485
FSEntry::Dir(DirEntry {
482486
properties,
483487
children,
@@ -555,6 +559,7 @@ pub mod handle_creation {
555559
.unwrap();
556560

557561
/* (2) Generate handles. */
562+
#[cfg_attr(not(unix), allow(unused_variables))]
558563
let AllocatedHandles {
559564
file_handle_mapping,
560565
perms_todo,

src/read/split.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Traits for splitting and teeing file contents into multiple parallel streams.
22
3+
#![cfg_attr(not(unix), allow(dead_code))]
4+
35
macro_rules! interruptible_buffered_io_op {
46
($op:expr) => {
57
match $op {
@@ -10,6 +12,7 @@ macro_rules! interruptible_buffered_io_op {
1012
};
1113
}
1214

15+
#[cfg_attr(not(unix), allow(unused_macros))]
1316
macro_rules! syscall_errno {
1417
($syscall:expr) => {
1518
match $syscall {

0 commit comments

Comments
 (0)