mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-15 21:53:59 +03:00
fix: put eprintln
usage behind #[cfg(debug_assertions)]
This commit is contained in:
parent
696dca58a9
commit
dc8ae7485e
@ -40,6 +40,7 @@ impl<R: Read + Seek> Extract<R> {
|
||||
/// Create archive from reader.
|
||||
pub fn from_cursor(mut reader: R, archive_format: ArchiveFormat) -> Extract<R> {
|
||||
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
||||
#[cfg(debug_assertions)]
|
||||
eprintln!("Could not seek to start of the file");
|
||||
}
|
||||
Extract {
|
||||
@ -53,6 +54,7 @@ impl<R: Read + Seek> Extract<R> {
|
||||
let reader = &mut self.reader;
|
||||
let mut all_files = Vec::new();
|
||||
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
||||
#[cfg(debug_assertions)]
|
||||
eprintln!("Could not seek to start of the file");
|
||||
}
|
||||
match self.archive_format {
|
||||
@ -88,6 +90,7 @@ impl<R: Read + Seek> Extract<R> {
|
||||
compression: Option<Compression>,
|
||||
) -> Either<&mut R, flate2::read::GzDecoder<&mut R>> {
|
||||
if source.seek(io::SeekFrom::Start(0)).is_err() {
|
||||
#[cfg(debug_assertions)]
|
||||
eprintln!("Could not seek to start of the file");
|
||||
}
|
||||
match compression {
|
||||
@ -102,6 +105,7 @@ impl<R: Read + Seek> Extract<R> {
|
||||
pub fn extract_into(&mut self, into_dir: &path::Path) -> crate::api::Result<()> {
|
||||
let reader = &mut self.reader;
|
||||
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
||||
#[cfg(debug_assertions)]
|
||||
eprintln!("Could not seek to start of the file");
|
||||
}
|
||||
match self.archive_format {
|
||||
|
Loading…
Reference in New Issue
Block a user