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

Upgrade to redb 0.11.0 #1099

Merged
merged 1 commit into from
Dec 27, 2022
Merged

Upgrade to redb 0.11.0 #1099

merged 1 commit into from
Dec 27, 2022

Conversation

cberner
Copy link
Contributor

@cberner cberner commented Dec 26, 2022

I haven't finished benchmarking the mmap backend against the new safe one, so I left ord using the mmap backend.

@casey casey merged commit 3fcaee6 into ordinals:master Dec 27, 2022
@casey
Copy link
Collaborator

casey commented Dec 27, 2022

Nice! Thanks for the PR! Can AccessGuard<T> implement Deref<T>? Not sure if this is possible, but if it were, it might make them slightly more convenient.

@cberner
Copy link
Contributor Author

cberner commented Dec 27, 2022

I don't think that's possible today, because .value() returns the lifetime of &self. If they have a LendingDeref in the future that would work though.

@cberner cberner deleted the userspace_cache branch December 27, 2022 01:20
@casey
Copy link
Collaborator

casey commented Dec 27, 2022

Can't Deref::deref borrow &self?

The trait is fn deref(&self) -> &Self::Target; which has an elided lifetime, so it's actually fn deref<'a>(&'a self) -> &'a Self::Target;

@cberner
Copy link
Contributor Author

cberner commented Dec 27, 2022

oh right, duh. I mixed this up with a different issue I had =P The problem with Deref is that it returns &Self::Target, but I need to return Self::Target for types like u64

@casey casey mentioned this pull request Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants