Skip to content
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

Merged
merged 2 commits into from
Nov 1, 2023
Merged

More shale cleanups #337

merged 2 commits into from
Nov 1, 2023

Conversation

rkuris
Copy link
Collaborator

@rkuris rkuris commented Nov 1, 2023

Small doc fix and remove Box around StoredView

@rkuris rkuris enabled auto-merge (squash) November 1, 2023 18:36
Copy link
Contributor

@richardpringle richardpringle left a 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)?;
Copy link
Contributor

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>,
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@rkuris rkuris merged commit 3718962 into main Nov 1, 2023
5 checks passed
@rkuris rkuris deleted the rkuris/shale-cleanup-4 branch November 1, 2023 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants