mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-05 18:47:50 +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.
|
/// Create archive from reader.
|
||||||
pub fn from_cursor(mut reader: R, archive_format: ArchiveFormat) -> Extract<R> {
|
pub fn from_cursor(mut reader: R, archive_format: ArchiveFormat) -> Extract<R> {
|
||||||
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
eprintln!("Could not seek to start of the file");
|
eprintln!("Could not seek to start of the file");
|
||||||
}
|
}
|
||||||
Extract {
|
Extract {
|
||||||
@ -53,6 +54,7 @@ impl<R: Read + Seek> Extract<R> {
|
|||||||
let reader = &mut self.reader;
|
let reader = &mut self.reader;
|
||||||
let mut all_files = Vec::new();
|
let mut all_files = Vec::new();
|
||||||
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
eprintln!("Could not seek to start of the file");
|
eprintln!("Could not seek to start of the file");
|
||||||
}
|
}
|
||||||
match self.archive_format {
|
match self.archive_format {
|
||||||
@ -88,6 +90,7 @@ impl<R: Read + Seek> Extract<R> {
|
|||||||
compression: Option<Compression>,
|
compression: Option<Compression>,
|
||||||
) -> Either<&mut R, flate2::read::GzDecoder<&mut R>> {
|
) -> Either<&mut R, flate2::read::GzDecoder<&mut R>> {
|
||||||
if source.seek(io::SeekFrom::Start(0)).is_err() {
|
if source.seek(io::SeekFrom::Start(0)).is_err() {
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
eprintln!("Could not seek to start of the file");
|
eprintln!("Could not seek to start of the file");
|
||||||
}
|
}
|
||||||
match compression {
|
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<()> {
|
pub fn extract_into(&mut self, into_dir: &path::Path) -> crate::api::Result<()> {
|
||||||
let reader = &mut self.reader;
|
let reader = &mut self.reader;
|
||||||
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
if reader.seek(io::SeekFrom::Start(0)).is_err() {
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
eprintln!("Could not seek to start of the file");
|
eprintln!("Could not seek to start of the file");
|
||||||
}
|
}
|
||||||
match self.archive_format {
|
match self.archive_format {
|
||||||
|
Loading…
Reference in New Issue
Block a user