From 4676a63c6995021363e94f897d2e57a330dbb444 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Thu, 9 Nov 2023 10:42:54 +0100 Subject: [PATCH] Fix warnings for disabled features --- src/checks/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/checks/mod.rs b/src/checks/mod.rs index 2729565..949f533 100644 --- a/src/checks/mod.rs +++ b/src/checks/mod.rs @@ -26,12 +26,12 @@ use std::fmt::{Display, Formatter}; use std::path::Path; use console::style; -use deob::deobfuscate; #[cfg(feature = "unzip-osb")] pub mod osb; pub mod osc; +#[allow(dead_code)] pub enum CheckNotice { /// This will result in Error if importing file and has a support code ErrorWithCode { @@ -137,13 +137,17 @@ pub trait Fixable { fn fix(&mut self) -> bool; } +#[allow(unused_variables)] pub fn check_file(file: &Path, password: Option) -> Vec { match file.extension() { Some(ex) => match ex.to_str() { #[cfg(feature = "unzip-osb")] Some("osb") => match password { Some(password) => osb::check_file(file, password.as_str()), - None => osb::check_file(file, deobfuscate(env!("OSB_KEY").trim()).as_str()), + None => { + use deob::deobfuscate; + osb::check_file(file, deobfuscate(env!("OSB_KEY").trim()).as_str()) + } }, Some("osc") => osc::check_file(file), _ => vec![CheckNotice::Error {