mirror of
https://github.com/Zenithsiz/dcb.git
synced 2026-02-04 00:21:57 +00:00
Removed TODO based on currently nightly supporting the feature.
This commit is contained in:
parent
de5c550e7a
commit
8e48e530ab
@ -49,11 +49,6 @@
|
||||
#![allow(clippy::pattern_type_mismatch)]
|
||||
// Sometimes the blocks make it easier to invert their order
|
||||
#![allow(clippy::if_not_else)]
|
||||
// False positives:
|
||||
// TODO: Remove them in the future once they are no longer triggered.
|
||||
// We only slice arrays, which are verified at compile time. This
|
||||
// lint currently triggers for `&[T; N]`, which we pass around a lot.
|
||||
#![allow(clippy::indexing_slicing)]
|
||||
|
||||
// Modules
|
||||
pub mod bytes;
|
||||
|
||||
@ -73,7 +73,6 @@ 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<R: Read + Write + Seek>(file: &mut GameFile<R>) -> Result<Self, DeserializeError> {
|
||||
@ -82,7 +81,7 @@ impl Table {
|
||||
.map_err(DeserializeError::Seek)?;
|
||||
|
||||
// Read header
|
||||
let mut header_bytes = [0u8; Table::HEADER_BYTE_SIZE];
|
||||
let mut header_bytes = [0u8; Self::HEADER_BYTE_SIZE];
|
||||
file.read_exact(&mut header_bytes).map_err(DeserializeError::ReadHeader)?;
|
||||
let header = array_split! {&header_bytes,
|
||||
magic: [0x4],
|
||||
|
||||
@ -42,7 +42,6 @@ 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<R>(file: &mut GameFile<R>) -> Result<Self, DeserializeError>
|
||||
@ -54,7 +53,7 @@ impl Table {
|
||||
.map_err(DeserializeError::Seek)?;
|
||||
|
||||
// Read header
|
||||
let mut header_bytes = [0u8; Table::HEADER_BYTE_SIZE];
|
||||
let mut header_bytes = [0u8; Self::HEADER_BYTE_SIZE];
|
||||
file.read_exact(&mut header_bytes).map_err(DeserializeError::ReadHeader)?;
|
||||
|
||||
// Check if the magic is right
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user