mirror of
https://github.com/xavo95/repak.git
synced 2025-01-18 19:04:07 +00:00
only run tests when default features are enabled
This commit is contained in:
parent
f166ee685f
commit
87efb35d66
3 changed files with 4 additions and 2 deletions
|
@ -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()],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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()))?;
|
||||||
|
|
|
@ -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};
|
||||||
|
|
Loading…
Reference in a new issue