From 87efb35d661a6e81cb285919b3d1ddaa9798c19c Mon Sep 17 00:00:00 2001 From: spuds <71292624+bananaturtlesandwich@users.noreply.github.com> Date: Mon, 28 Aug 2023 06:40:45 +0100 Subject: [PATCH] only run tests when default features are enabled --- repak/src/entry.rs | 3 ++- repak/src/pak.rs | 2 +- repak/tests/test.rs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/repak/src/entry.rs b/repak/src/entry.rs index a6476b0..bf9e5ba 100644 --- a/repak/src/entry.rs +++ b/repak/src/entry.rs @@ -311,7 +311,7 @@ impl Entry { reader: &mut R, version: Version, compression: &[Compression], - key: &super::Key, + #[allow(unused)] key: &super::Key, buf: &mut W, ) -> Result<(), super::Error> { reader.seek(io::SeekFrom::Start(self.offset))?; @@ -355,6 +355,7 @@ impl Entry { }, ) .collect::>(), + #[allow(clippy::single_range_in_vec_init)] None => vec![0..data.len()], }; diff --git a/repak/src/pak.rs b/repak/src/pak.rs index 730f233..cf3f596 100644 --- a/repak/src/pak.rs +++ b/repak/src/pak.rs @@ -321,7 +321,7 @@ impl Pak { fn read( reader: &mut R, version: super::Version, - key: &super::Key, + #[allow(unused)] key: &super::Key, ) -> Result { // read footer to get index, encryption & compression info reader.seek(io::SeekFrom::End(-version.size()))?; diff --git a/repak/tests/test.rs b/repak/tests/test.rs index 2c0c06a..9c70099 100644 --- a/repak/tests/test.rs +++ b/repak/tests/test.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "default")] use byteorder::{ReadBytesExt, WriteBytesExt}; use paste::paste; use std::io::{self, Cursor, Read, Seek, SeekFrom};