Skip to content

Commit

Permalink
Merge pull request rust-lang#109 from Nemo157/oid_as_ref
Browse files Browse the repository at this point in the history
Add `impl AsRef<[u8]> for Oid` (closes rust-lang#108)
  • Loading branch information
alexcrichton committed Feb 18, 2016
2 parents c5115c9 + 2e77aa4 commit 5eb2825
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 5eb2825

Please sign in to comment.