From eafd458fe5e249b521ff2cb357776d33880f1b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Dec 2026 13:36:15 +0300 Subject: [PATCH] U13: remove Timestamp::checked_add_ticks and checked_diff; no caller in the workspace, edith or yumush --- crates/ec-core/src/timebase.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/crates/ec-core/src/timebase.rs b/crates/ec-core/src/timebase.rs index 64a69c07..84470e7e 100644 --- a/crates/ec-core/src/timebase.rs +++ b/crates/ec-core/src/timebase.rs @@ -198,19 +198,6 @@ impl Timestamp { .map(|t| Timestamp::new(t, base)) } - /// Advance by `ticks` of this timestamp's own base. - pub fn checked_add_ticks(&self, ticks: i64) -> Option { - self.ticks - .checked_add(ticks) - .map(|t| Timestamp::new(t, self.base)) - } - - /// `self - other`, in this timestamp's base, exact. - pub fn checked_diff(&self, other: Timestamp) -> Option { - let o = other.checked_rescale(self.base, Rounding::Nearest)?; - self.ticks.checked_sub(o.ticks) - } - /// Seconds as a float. Display only. pub fn as_secs_f64(&self) -> f64 { self.ticks as f64 * self.base.as_secs_f64() @@ -341,8 +328,6 @@ mod tests { let a = Timestamp::new(90_000, TimeBase::MPEG_TS); // 1 s let b = Timestamp::new(1_000, TimeBase::MILLIS); // 1 s assert_eq!(a, b); - assert_eq!(a.checked_diff(b), Some(0)); - assert_eq!(a.checked_add_ticks(90_000).unwrap().ticks, 180_000); assert_eq!(a.rescale(TimeBase::MILLIS, Rounding::Nearest).ticks, 1_000); assert!(Timestamp::new(0, TimeBase::MILLIS) < a); }