changeset 347:266f92d7b828

key_types: Implement Clone+Copy for ValueType
author Lewin Bormann <lbo@spheniscida.de>
date Thu, 05 Oct 2017 19:07:16 +0200
parents a76ff74f0c0f
children e349dc30f464
files src/key_types.rs src/table_cache.rs
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/key_types.rs	Thu Oct 05 19:06:58 2017 +0200
+++ b/src/key_types.rs	Thu Oct 05 19:07:16 2017 +0200
@@ -11,7 +11,7 @@
 // TODO: At some point, convert those into actual types with conversions between them. That's a lot
 // of boilerplate, but increases type safety.
 
-#[derive(Debug, PartialOrd, PartialEq)]
+#[derive(Debug, Clone, Copy, PartialOrd, PartialEq)]
 pub enum ValueType {
     TypeDeletion = 0,
     TypeValue = 1,
--- a/src/table_cache.rs	Thu Oct 05 19:06:58 2017 +0200
+++ b/src/table_cache.rs	Thu Oct 05 19:07:16 2017 +0200
@@ -48,7 +48,7 @@
                    key: InternalKey<'a>)
                    -> Result<Option<(Vec<u8>, Vec<u8>)>> {
         let tbl = self.get_table(file_num)?;
-        Ok(tbl.get(key))
+        tbl.get(key)
     }
 
     /// Return a table from cache, or open the backing file, then cache and return it.