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

chore: clean up Self: Sized bounds #5481

Merged
merged 2 commits into from
Nov 18, 2023
Merged

chore: clean up Self: Sized bounds #5481

merged 2 commits into from
Nov 18, 2023

Conversation

DaniPopes
Copy link
Member

No description provided.

self.inner
.set(key.as_ref())
.map_err(|e| DatabaseError::Read(e.into()))?
.map(|val| decoder::<T>((Cow::Owned(key), val)))
}
(None, Some(subkey)) => {
if let Some((key, _)) = self.first()? {
let key = key.encode().as_ref().to_vec();

let key: Vec<u8> = key.encode().into();
Copy link
Member Author

Choose a reason for hiding this comment

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

Also Encode::Encoded: Into<Vec<u8>> so this can be optimized a bit

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm

@mattsse mattsse added the C-debt A clean up/refactor of existing code label Nov 18, 2023
@DaniPopes DaniPopes enabled auto-merge November 18, 2023 02:07
@DaniPopes DaniPopes added this pull request to the merge queue Nov 18, 2023
Merged via the queue into main with commit e34aec2 Nov 18, 2023
@DaniPopes DaniPopes deleted the dani/self-sized branch November 18, 2023 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt A clean up/refactor of existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants