Skip to content

Commit 81251f1

Browse files
committed
fix up the formatting
1 parent 249bf29 commit 81251f1

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/bitfield.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ pub struct Flag<'a> {
1717
}
1818

1919
/// There are 2 types of *Bit Field* flag meaningful and reserved for some purposes
20-
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
21-
#[derive(Default)]
20+
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Default)]
2221
pub enum FlagType<'a> {
2322
#[default]
2423
Unknown,
@@ -167,7 +166,6 @@ impl fmt::Debug for Flag<'_> {
167166
}
168167
}
169168

170-
171169
impl<'a, T> Iter<'a, T> {
172170
fn new(value: T, layout: Layout<'a>) -> Self {
173171
Self {

src/structures/016_physical_memory_array.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ use core::fmt;
88

99
use crate::{MalformedStructureError, RawStructure};
1010

11-
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
12-
#[derive(Default)]
11+
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Default)]
1312
pub enum MemoryArrayLocation {
1413
Other,
1514
#[default]
@@ -30,7 +29,6 @@ pub enum MemoryArrayLocation {
3029
Undefined(u8),
3130
}
3231

33-
3432
impl From<u8> for MemoryArrayLocation {
3533
fn from(_type: u8) -> Self {
3634
match _type {
@@ -77,8 +75,7 @@ impl fmt::Display for MemoryArrayLocation {
7775
}
7876
}
7977

80-
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
81-
#[derive(Default)]
78+
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Default)]
8279
pub enum MemoryArrayUse {
8380
Other,
8481
#[default]
@@ -91,7 +88,6 @@ pub enum MemoryArrayUse {
9188
Undefined(u8),
9289
}
9390

94-
9591
impl From<u8> for MemoryArrayUse {
9692
fn from(_type: u8) -> Self {
9793
match _type {
@@ -122,8 +118,7 @@ impl fmt::Display for MemoryArrayUse {
122118
}
123119
}
124120

125-
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
126-
#[derive(Default)]
121+
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Default)]
127122
pub enum MemoryArrayErrorCorrectionTypes {
128123
Other,
129124
#[default]
@@ -136,7 +131,6 @@ pub enum MemoryArrayErrorCorrectionTypes {
136131
Undefined(u8),
137132
}
138133

139-
140134
impl From<u8> for MemoryArrayErrorCorrectionTypes {
141135
fn from(_type: u8) -> Self {
142136
match _type {

0 commit comments

Comments
 (0)