Skip to content

Commit

Permalink
Add impl AsRef<[u8]> for Oid (closes rust-lang#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed Feb 18, 2016
1 parent 94247a3 commit 2e77aa4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/oid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ impl Hash for Oid {
}
}

impl AsRef<[u8]> for Oid {
fn as_ref(&self) -> &[u8] { self.as_bytes() }
}

#[cfg(test)]
mod tests {
use super::Oid;
Expand Down

0 comments on commit 2e77aa4

Please sign in to comment.