fix: fix windows build

This commit is contained in:
ttyS3 2024-09-06 14:05:20 +00:00 committed by João Marcos
parent 61868dfb56
commit 67ca183a25

View File

@ -5,10 +5,15 @@ mod decompress;
mod list;
use std::{ops::ControlFlow, path::PathBuf};
use std::os::unix::prelude::OsStrExt;
use rayon::prelude::{IndexedParallelIterator, IntoParallelRefIterator, ParallelIterator};
use utils::colors;
// OsStrExt for password as_bytes() conversion
#[cfg(unix)]
use std::os::unix::prelude::OsStrExt;
#[cfg(windows)]
use std::os::windows::prelude::OsStrExt;
use crate::{
check,
cli::Subcommand,
@ -188,7 +193,7 @@ pub fn run(
output_file_path,
question_policy,
args.quiet,
args.password.as_deref().map(|str|str.as_bytes()),
args.password.as_deref().map(|str| str.as_bytes()),
)
})
}