diff --git a/src/game/card/table.rs b/src/game/card/table.rs index 5ca206a..b3d16a3 100644 --- a/src/game/card/table.rs +++ b/src/game/card/table.rs @@ -75,6 +75,7 @@ impl Table { } } +#[allow(clippy::use_self)] // TODO: Remove once `min_const_generics` allows us to use it impl Table { /// Deserializes the card table from a game file pub fn deserialize(file: &mut GameFile) -> Result { @@ -83,7 +84,7 @@ impl Table { .map_err(DeserializeError::Seek)?; // Read header - let mut header_bytes = [0u8; Self::HEADER_BYTE_SIZE]; + let mut header_bytes = [0u8; Table::HEADER_BYTE_SIZE]; file.read_exact(&mut header_bytes).map_err(DeserializeError::ReadHeader)?; let header = array_split! {&header_bytes, magic: [0x4], diff --git a/src/game/deck/table.rs b/src/game/deck/table.rs index 2797704..abfbd7f 100644 --- a/src/game/deck/table.rs +++ b/src/game/deck/table.rs @@ -41,6 +41,7 @@ impl Table { const START_ADDRESS: Data = Data::from_u64(0x21a6800); } +#[allow(clippy::use_self)] // TODO: Remove once `min_const_generics` allows us to use it impl Table { /// Deserializes the deck table from `file`. pub fn deserialize(file: &mut GameFile) -> Result @@ -52,7 +53,7 @@ impl Table { .map_err(DeserializeError::Seek)?; // Read header - let mut header_bytes = [0u8; Self::HEADER_BYTE_SIZE]; + let mut header_bytes = [0u8; Table::HEADER_BYTE_SIZE]; file.read_exact(&mut header_bytes).map_err(DeserializeError::ReadHeader)?; // Check if the magic is right diff --git a/src/lib.rs b/src/lib.rs index d06cdf2..67c5578 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,8 @@ external_doc, format_args_capture, const_fn, - const_panic + const_panic, + min_const_generics )] // Lints #![warn(clippy::restriction, clippy::pedantic, clippy::nursery)]