Skip to content

Commit

Permalink
⚡ impl From<{RegularEntry | SolidEntry}> for ReadEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanTsune committed Oct 5, 2024
1 parent bc5a3a7 commit da5aee6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,20 @@ where
}
}

impl<T> From<RegularEntry<T>> for ReadEntry<T> {
#[inline]
fn from(value: RegularEntry<T>) -> Self {
Self::Regular(value)
}
}

impl<T> From<SolidEntry<T>> for ReadEntry<T> {
#[inline]
fn from(value: SolidEntry<T>) -> Self {
Self::Solid(value)
}
}

impl<'a> From<ReadEntry<Cow<'a, [u8]>>> for ReadEntry<Vec<u8>> {
#[inline]
fn from(value: ReadEntry<Cow<'a, [u8]>>) -> Self {
Expand Down

0 comments on commit da5aee6

Please sign in to comment.