only run tests when default features are enabled

This commit is contained in:
spuds 2023-08-28 06:40:45 +01:00
parent f166ee685f
commit 87efb35d66
No known key found for this signature in database
GPG key ID: 0B6CA6068E827C8F
3 changed files with 4 additions and 2 deletions

View file

@ -311,7 +311,7 @@ impl Entry {
reader: &mut R, reader: &mut R,
version: Version, version: Version,
compression: &[Compression], compression: &[Compression],
key: &super::Key, #[allow(unused)] key: &super::Key,
buf: &mut W, buf: &mut W,
) -> Result<(), super::Error> { ) -> Result<(), super::Error> {
reader.seek(io::SeekFrom::Start(self.offset))?; reader.seek(io::SeekFrom::Start(self.offset))?;
@ -355,6 +355,7 @@ impl Entry {
}, },
) )
.collect::<Vec<_>>(), .collect::<Vec<_>>(),
#[allow(clippy::single_range_in_vec_init)]
None => vec![0..data.len()], None => vec![0..data.len()],
}; };

View file

@ -321,7 +321,7 @@ impl Pak {
fn read<R: Read + Seek>( fn read<R: Read + Seek>(
reader: &mut R, reader: &mut R,
version: super::Version, version: super::Version,
key: &super::Key, #[allow(unused)] key: &super::Key,
) -> Result<Self, super::Error> { ) -> Result<Self, super::Error> {
// read footer to get index, encryption & compression info // read footer to get index, encryption & compression info
reader.seek(io::SeekFrom::End(-version.size()))?; reader.seek(io::SeekFrom::End(-version.size()))?;

View file

@ -1,3 +1,4 @@
#![cfg(feature = "default")]
use byteorder::{ReadBytesExt, WriteBytesExt}; use byteorder::{ReadBytesExt, WriteBytesExt};
use paste::paste; use paste::paste;
use std::io::{self, Cursor, Read, Seek, SeekFrom}; use std::io::{self, Cursor, Read, Seek, SeekFrom};