Implementing AsRef<[u8]> for DBVector...

master
Jordan Terrell 6 years ago
parent 09dce1d298
commit b3c10809fe
  1. 7
      src/db.rs

@ -1769,6 +1769,13 @@ impl Deref for DBVector {
} }
} }
impl AsRef<[u8]> for DBVector {
fn as_ref(&self) -> &[u8] {
// Implement this via Deref so as not to repeat ourselves
&*self
}
}
impl Drop for DBVector { impl Drop for DBVector {
fn drop(&mut self) { fn drop(&mut self) {
unsafe { unsafe {

Loading…
Cancel
Save