Skip to content

Commit

Permalink
Update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mhluska committed Sep 5, 2023
1 parent 26671ed commit 1539629
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ pub fn save_data_into_std_write<T: FileData, W: Write>(
let mut zstd_encoder = zstd::stream::Encoder::new(writer, compression_level)
.map_err(|e| format!("Failed to create zstd encoder: {}", e))?;
let workers = available_parallelism()
.map_err(|e| format!("Failed to get cores: {}", e))?
.map_err(|e| format!("Failed to get cpu cores: {}", e))?
.get() as u32;
zstd_encoder
.multithread(workers)
.map_err(|e| format!("Failed to set workers: {}", e))?;
.map_err(|e| format!("Failed to enable multithreaded compression: {}", e))?;

encode_into_std_write(data, &mut zstd_encoder, "Failed to write data")?;
zstd_encoder
Expand Down

0 comments on commit 1539629

Please sign in to comment.