Skip to content

Commit d3c9a81

Browse files
authored
Implement From<u5> for u8 (#58)
Currently we have an implementation of `Into` for `u8`, if we implement `From<u5>` for `u8` we get the `Into` implementation for free.
1 parent 3dfe253 commit d3c9a81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ impl u5 {
9999
}
100100
}
101101

102-
impl Into<u8> for u5 {
103-
fn into(self) -> u8 {
104-
self.0
102+
impl From<u5> for u8 {
103+
fn from(v: u5) -> u8 {
104+
v.0
105105
}
106106
}
107107

0 commit comments

Comments
 (0)