Skip to content

Commit

Permalink
Implement From<u5> for u8 (#58)
Browse files Browse the repository at this point in the history
Currently we have an implementation of `Into` for `u8`, if we implement
`From<u5>` for `u8` we get the `Into` implementation for free.
  • Loading branch information
tcharding committed Jan 6, 2022
1 parent 3dfe253 commit d3c9a81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ impl u5 {
}
}

impl Into<u8> for u5 {
fn into(self) -> u8 {
self.0
impl From<u5> for u8 {
fn from(v: u5) -> u8 {
v.0
}
}

Expand Down

0 comments on commit d3c9a81

Please sign in to comment.