mirror of
https://github.com/encounter/nod-rs.git
synced 2025-12-11 14:41:48 +00:00
More concise code
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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}"))),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user