Skip to content

Commit

Permalink
silence dead code warnings for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Aug 20, 2024
1 parent 4bbc351 commit 35ffc72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/read/pipelining.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Pipelined extraction into a filesystem directory.

#![cfg_attr(not(unix), allow(dead_code))]

pub mod path_splitting {
use displaydoc::Display;
use thiserror::Error;
Expand Down Expand Up @@ -461,6 +463,7 @@ pub mod handle_creation {
FSEntry::File(data) => {
let key = ZipDataHandle::wrap(data);

#[cfg_attr(not(unix), allow(unused_variables))]
if let Some(mode) = data.unix_mode() {
/* TODO: consider handling the readonly bit on windows. We don't currently
* do this in normal extraction, so we don't need to do this yet for
Expand All @@ -479,6 +482,7 @@ pub mod handle_creation {
assert!(file_handle_mapping.insert(key, handle).is_none());
}
FSEntry::Dir(DirEntry {

Check failure on line 484 in src/read/pipelining.rs

View workflow job for this annotation

GitHub Actions / Build and test --all-features: windows-latest, nightly

pattern does not mention field `properties`

Check failure on line 484 in src/read/pipelining.rs

View workflow job for this annotation

GitHub Actions / Build and test --all-features: windows-latest, msrv

pattern does not mention field `properties`
#[cfg(unix)]
properties,
children,
}) => {
Expand Down
3 changes: 3 additions & 0 deletions src/read/split.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Traits for splitting and teeing file contents into multiple parallel streams.

#![cfg_attr(not(unix), allow(dead_code))]

macro_rules! interruptible_buffered_io_op {
($op:expr) => {
match $op {
Expand All @@ -10,6 +12,7 @@ macro_rules! interruptible_buffered_io_op {
};
}

#[cfg_attr(not(unix), allow(unused_macros))]
macro_rules! syscall_errno {
($syscall:expr) => {
match $syscall {
Expand Down

0 comments on commit 35ffc72

Please sign in to comment.