Skip to content

Commit

Permalink
Merge pull request #21 from cassiersg/idcode
Browse files Browse the repository at this point in the history
impl From<IdCode> for u64
  • Loading branch information
kevinmehall authored Feb 27, 2024
2 parents 5e7cdef + 59dff0c commit 2e451f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/idcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ impl From<u64> for IdCode {
}
}

impl From<IdCode> for u64 {
fn from(i: IdCode) -> u64 {
i.0
}
}

impl Display for IdCode {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut i = self.0;
Expand Down

0 comments on commit 2e451f8

Please sign in to comment.