chore: rename "as u8" to "as Self" when implementing From Trait

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-03-20 21:10:48 -05:00
parent cd0eac9d37
commit fc303b6265
3 changed files with 7 additions and 7 deletions

View File

@ -250,7 +250,7 @@ impl From<u8> for Mode {
impl From<Mode> for u8 {
fn from(mode: Mode) -> Self {
mode as u8
mode as Self
}
}
@ -326,7 +326,7 @@ impl From<u8> for TileMapAddress {
impl From<TileMapAddress> for u8 {
fn from(reg: TileMapAddress) -> Self {
reg as u8
reg as Self
}
}
@ -354,7 +354,7 @@ impl From<u8> for TileDataAddress {
impl From<TileDataAddress> for u8 {
fn from(reg: TileDataAddress) -> Self {
reg as u8
reg as Self
}
}
@ -382,7 +382,7 @@ impl From<u8> for ObjectSize {
impl From<ObjectSize> for u8 {
fn from(size: ObjectSize) -> Self {
size as u8
size as Self
}
}
@ -431,7 +431,7 @@ impl From<u8> for GrayShade {
impl From<GrayShade> for u8 {
fn from(shade: GrayShade) -> Self {
shade as u8
shade as Self
}
}

View File

@ -253,7 +253,7 @@ impl Default for WavePattern {
impl From<WavePattern> for u8 {
fn from(pattern: WavePattern) -> Self {
pattern as u8
pattern as Self
}
}

View File

@ -43,7 +43,7 @@ impl From<u8> for TimerSpeed {
impl From<TimerSpeed> for u8 {
fn from(speed: TimerSpeed) -> Self {
speed as u8
speed as Self
}
}