From 214dbdf9a5a82e7f18bfec346029990f014dfda1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 20 Jun 2024 13:43:40 +0200 Subject: [PATCH] time: remove deprecated functions Signed-off-by: Wolfgang Bumiller --- proxmox-time/src/calendar_event.rs | 22 ---------------------- proxmox-time/src/time_span.rs | 6 ------ 2 files changed, 28 deletions(-) diff --git a/proxmox-time/src/calendar_event.rs b/proxmox-time/src/calendar_event.rs index 46fa1806..696a11a2 100644 --- a/proxmox-time/src/calendar_event.rs +++ b/proxmox-time/src/calendar_event.rs @@ -178,28 +178,6 @@ pub fn verify_calendar_event(i: &str) -> Result<(), Error> { Ok(()) } -/// Compute the next event. Use [CalendarEvent::compute_next_event] instead. -#[deprecated = "use method 'compute_next_event' of CalendarEvent instead"] -#[cfg(not(target_arch = "wasm32"))] -pub fn compute_next_event( - event: &CalendarEvent, - last: i64, - utc: bool, -) -> Result, Error> { - if event.utc != utc { - let mut event = event.clone(); - event.utc = utc; - return event.compute_next_event(last); - } - event.compute_next_event(last) -} - -/// Parse a [CalendarEvent] -#[deprecated = "use std::str::FromStr trait instead"] -pub fn parse_calendar_event(i: &str) -> Result { - i.parse() -} - fn parse_calendar_event_incomplete(mut i: &str) -> IResult<&str, CalendarEvent> { let mut has_dayspec = false; let mut has_timespec = false; diff --git a/proxmox-time/src/time_span.rs b/proxmox-time/src/time_span.rs index 418c560e..e580c3d6 100644 --- a/proxmox-time/src/time_span.rs +++ b/proxmox-time/src/time_span.rs @@ -206,12 +206,6 @@ impl std::str::FromStr for TimeSpan { } } -/// Parse a [TimeSpan] -#[deprecated = "Use std::str::FromStr trait instead."] -pub fn parse_time_span(i: &str) -> Result { - i.parse() -} - fn parse_time_span_incomplete(mut i: &str) -> IResult<&str, TimeSpan> { let mut ts = TimeSpan::default();