More concise code

This commit is contained in:
Manuel Quarneti
2025-09-11 23:11:14 +02:00
parent f359987757
commit 42725c60f8
2 changed files with 2 additions and 4 deletions

View File

@@ -54,8 +54,7 @@ impl Format {
#[cfg(feature = "compress-zlib")]
Format::Gcz => crate::io::gcz::DEFAULT_BLOCK_SIZE,
Format::Rvz => crate::io::wia::RVZ_DEFAULT_CHUNK_SIZE,
Format::Wbfs => crate::io::wbfs::DEFAULT_BLOCK_SIZE,
Format::StrippedWbfs(_) => crate::io::wbfs::DEFAULT_BLOCK_SIZE,
Format::Wbfs | Format::StrippedWbfs(_) => crate::io::wbfs::DEFAULT_BLOCK_SIZE,
Format::Wia => crate::io::wia::WIA_DEFAULT_CHUNK_SIZE,
_ => 0,
}

View File

@@ -106,8 +106,7 @@ impl DiscWriter {
#[cfg(feature = "compress-zlib")]
Format::Gcz => crate::io::gcz::DiscWriterGCZ::new(reader, &options)?,
Format::Tgc => crate::io::tgc::DiscWriterTGC::new(reader, &options)?,
Format::Wbfs => crate::io::wbfs::DiscWriterWBFS::new(reader, &options)?,
Format::StrippedWbfs(_) => crate::io::wbfs::DiscWriterWBFS::new(reader, &options)?,
Format::Wbfs | Format::StrippedWbfs(_) => crate::io::wbfs::DiscWriterWBFS::new(reader, &options)?,
Format::Wia | Format::Rvz => crate::io::wia::DiscWriterWIA::new(reader, &options)?,
format => return Err(Error::Other(format!("Unsupported write format: {format}"))),
};