diff --git a/nod/src/build/gc.rs b/nod/src/build/gc.rs index 84c155c..069c0aa 100644 --- a/nod/src/build/gc.rs +++ b/nod/src/build/gc.rs @@ -653,7 +653,7 @@ impl WriteCursor where W: Write { fn write_zeroes_until(&mut self, until: u64) -> io::Result<()> { - const ZEROES: [u8; 0x1000] = [0u8; 0x1000]; + static ZEROES: [u8; 0x1000] = [0u8; 0x1000]; let mut remaining = until.saturating_sub(self.position); while remaining > 0 { let write_len = remaining.min(ZEROES.len() as u64) as usize; diff --git a/nod/src/disc/wii.rs b/nod/src/disc/wii.rs index 7915c53..4b31725 100644 --- a/nod/src/disc/wii.rs +++ b/nod/src/disc/wii.rs @@ -47,7 +47,7 @@ pub const REGION_OFFSET: u64 = 0x4E000; // ppki (Retail) pub(crate) const RVL_CERT_ISSUER_PPKI_TICKET: &str = "Root-CA00000001-XS00000003"; #[rustfmt::skip] -pub(crate) const RETAIL_COMMON_KEYS: [KeyBytes; 3] = [ +pub(crate) static RETAIL_COMMON_KEYS: [KeyBytes; 3] = [ /* RVL_KEY_RETAIL */ [0xeb, 0xe4, 0x2a, 0x22, 0x5e, 0x85, 0x93, 0xe4, 0x48, 0xd9, 0xc5, 0x45, 0x73, 0x81, 0xaa, 0xf7], /* RVL_KEY_KOREAN */ @@ -59,7 +59,7 @@ pub(crate) const RETAIL_COMMON_KEYS: [KeyBytes; 3] = [ // dpki (Debug) pub(crate) const RVL_CERT_ISSUER_DPKI_TICKET: &str = "Root-CA00000002-XS00000006"; #[rustfmt::skip] -pub(crate) const DEBUG_COMMON_KEYS: [KeyBytes; 3] = [ +pub(crate) static DEBUG_COMMON_KEYS: [KeyBytes; 3] = [ /* RVL_KEY_DEBUG */ [0xa1, 0x60, 0x4a, 0x6a, 0x71, 0x23, 0xb5, 0x29, 0xae, 0x8b, 0xec, 0x32, 0xc8, 0x16, 0xfc, 0xaa], /* RVL_KEY_KOREAN_DEBUG */ diff --git a/nod/src/read.rs b/nod/src/read.rs index 219ff38..1aa14bc 100644 --- a/nod/src/read.rs +++ b/nod/src/read.rs @@ -222,7 +222,10 @@ impl dyn PartitionReader + '_ { /// ```no_run /// use std::io::Read; /// - /// use nod::read::{DiscOptions, DiscReader, PartitionKind, PartitionOptions}; + /// use nod::{ + /// common::PartitionKind, + /// read::{DiscOptions, DiscReader, PartitionOptions}, + /// }; /// /// fn main() -> nod::Result<()> { /// let disc = DiscReader::new("path/to/file.iso", &DiscOptions::default())?; @@ -262,7 +265,10 @@ impl dyn PartitionReader { /// ```no_run /// use std::io::Read; /// - /// use nod::read::{DiscOptions, DiscReader, OwnedFileReader, PartitionKind, PartitionOptions}; + /// use nod::{ + /// common::PartitionKind, + /// read::{DiscOptions, DiscReader, OwnedFileReader, PartitionOptions}, + /// }; /// /// fn main() -> nod::Result<()> { /// let disc = DiscReader::new("path/to/file.iso", &DiscOptions::default())?; diff --git a/nodtool/src/cmd/gen.rs b/nodtool/src/cmd/gen.rs index 77d3806..25f82cf 100644 --- a/nodtool/src/cmd/gen.rs +++ b/nodtool/src/cmd/gen.rs @@ -721,7 +721,7 @@ where W: Write fn flush(&mut self) -> io::Result<()> { self.inner.flush() } } -const ZERO_SECTOR: [u8; SECTOR_SIZE] = [0; SECTOR_SIZE]; +static ZERO_SECTOR: [u8; SECTOR_SIZE] = [0; SECTOR_SIZE]; impl Seek for HashStream where W: Write