Skip to content

Commit

Permalink
perf(stream): Ensure Checkpoint operations are inlined
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 31, 2024
1 parent bf23cd2 commit 79eab7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2767,6 +2767,7 @@ impl<T, S> Checkpoint<T, S> {
impl<T: Copy, S> Copy for Checkpoint<T, S> {}

impl<T: Clone, S> Clone for Checkpoint<T, S> {
#[inline(always)]
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
Expand All @@ -2776,18 +2777,21 @@ impl<T: Clone, S> Clone for Checkpoint<T, S> {
}

impl<T: PartialOrd, S> PartialOrd for Checkpoint<T, S> {
#[inline(always)]
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
self.inner.partial_cmp(&other.inner)
}
}

impl<T: Ord, S> Ord for Checkpoint<T, S> {
#[inline(always)]
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
self.inner.cmp(&other.inner)
}
}

impl<T: PartialEq, S> PartialEq for Checkpoint<T, S> {
#[inline(always)]
fn eq(&self, other: &Self) -> bool {
self.inner.eq(&other.inner)
}
Expand Down

0 comments on commit 79eab7b

Please sign in to comment.