-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More shale cleanups #337
More shale cleanups #337
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spring cleaning in November!?
@@ -253,7 +253,7 @@ impl<M: CachedStore> CompactSpaceInner<M> { | |||
.unwrap(); | |||
|
|||
if desc_addr != DiskAddress(**self.header.meta_space_tail) { | |||
let desc_last = self.get_descriptor(**self.header.meta_space_tail.value)?; | |||
let desc_last = self.get_descriptor(*self.header.meta_space_tail.value)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so much less pizzazz though...
@@ -99,7 +99,7 @@ pub trait CachedStore: Debug + Send + Sync { | |||
/// . Users of [ShaleStore] implementation, however, will only use [ObjRef] for safeguarded access. | |||
#[derive(Debug)] | |||
pub struct Obj<T: Storable> { | |||
value: Box<StoredView<T>>, | |||
value: StoredView<T>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One less indirection, 🎉
@@ -109,7 +109,7 @@ impl<T: Storable> Obj<T> { | |||
DiskAddress(NonZeroUsize::new(self.value.get_offset())) | |||
} | |||
|
|||
/// Write to the underlying object. Returns `Some(())` on success. | |||
/// Write to the underlying object. Returns `Ok(())` on success. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch
Small doc fix and remove Box around StoredView