mirror of
https://github.com/Zenithsiz/dcb.git
synced 2026-02-04 00:21:57 +00:00
Updated rustfmt.toml.
This commit is contained in:
parent
c705db9658
commit
5b484eece3
@ -19,7 +19,10 @@ macro_rules! derive_bytes_split {
|
||||
type ToError = !;
|
||||
|
||||
fn from_bytes(bytes: &Self::ByteArray) -> Result<Self, Self::FromError> {
|
||||
let ( $($field,)* ) = arrayref::array_refs![bytes, $( <<$U as ByteOrderExt<$crate::byteorder::$BYTEORDER>>::ByteArray as ByteArray>::SIZE ),*];
|
||||
let ( $($field,)* ) = arrayref::array_refs![
|
||||
bytes,
|
||||
$( <<$U as ByteOrderExt<$crate::byteorder::$BYTEORDER>>::ByteArray as ByteArray>::SIZE ),*
|
||||
];
|
||||
|
||||
Ok(Self {
|
||||
$(
|
||||
@ -29,7 +32,10 @@ macro_rules! derive_bytes_split {
|
||||
}
|
||||
|
||||
fn to_bytes(&self, bytes: &mut Self::ByteArray) -> Result<(), Self::ToError> {
|
||||
let ( $($field,)* ) = arrayref::mut_array_refs![bytes, $( <<$U as ByteOrderExt<$crate::byteorder::$BYTEORDER>>::ByteArray as ByteArray>::SIZE ),*];
|
||||
let ( $($field,)* ) = arrayref::mut_array_refs![
|
||||
bytes,
|
||||
$( <<$U as ByteOrderExt<$crate::byteorder::$BYTEORDER>>::ByteArray as ByteArray>::SIZE ),*
|
||||
];
|
||||
|
||||
$(
|
||||
<$U as ByteOrderExt::<$crate::byteorder::$BYTEORDER>>::write(&self.$field.into(), $field);
|
||||
|
||||
@ -31,7 +31,7 @@ pub enum ToBytesError {
|
||||
/// Out of range minute
|
||||
#[error("Out of range minute {_0:#x}")]
|
||||
OutOfRangeMinute(u8),
|
||||
|
||||
|
||||
/// Out of range second
|
||||
#[error("Out of range second {_0:#x}")]
|
||||
OutOfRangeSecond(u8),
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! File reader
|
||||
|
||||
// Imports
|
||||
use dcb_cdrom_xa::{CdRomReader, Sector, reader::ReadSectorError};
|
||||
use dcb_cdrom_xa::{reader::ReadSectorError, CdRomReader, Sector};
|
||||
use std::{convert::TryFrom, io};
|
||||
|
||||
/// A file reader
|
||||
|
||||
@ -23,7 +23,7 @@ pub enum FromReaderError {
|
||||
/// Unable to get position
|
||||
#[error("Unable to get position")]
|
||||
GetPos(#[source] io::Error),
|
||||
|
||||
|
||||
/// Unable to read model
|
||||
#[error("Unable to read model")]
|
||||
ReadModel(#[source] model::FromReaderError),
|
||||
|
||||
@ -17,7 +17,7 @@ pub enum FromReaderError {
|
||||
/// Unable to read object
|
||||
#[error("Unable to read object")]
|
||||
ReadObj(#[source] io::Error),
|
||||
|
||||
|
||||
/// Unable to seek past model
|
||||
#[error("Unable to seek past model")]
|
||||
SeekPastModel(#[source] io::Error),
|
||||
|
||||
@ -14,7 +14,7 @@ use_field_init_shorthand = true
|
||||
enum_discrim_align_threshold = 100
|
||||
fn_args_layout = "Compressed"
|
||||
merge_derives = false
|
||||
merge_imports = true
|
||||
imports_granularity="Crate"
|
||||
max_width = 150
|
||||
use_small_heuristics = "Default"
|
||||
indent_style = "Block"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user