From 3db2f13c1bd864ea11a43dc826e6a94eeb4e0186 Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Wed, 23 Jul 2025 18:19:23 +0200 Subject: [PATCH] rename vzic-rs to vtimezones-rs --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- crates/caldav/Cargo.toml | 2 +- crates/caldav/src/calendar/methods/mkcalendar.rs | 2 +- crates/caldav/src/calendar/resource.rs | 7 +++++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 741af06..509dd35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3065,7 +3065,7 @@ dependencies = [ "tracing", "url", "uuid", - "vzic-rs", + "vtimezones-rs", ] [[package]] @@ -4484,9 +4484,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "vzic-rs" +name = "vtimezones-rs" version = "0.1.0" -source = "git+https://github.com/lennart-k/vzic-rs?branch=main#1e63ad71fdc2aad193fd8da19cf21197a52a556b" +source = "git+https://github.com/lennart-k/vtimezones-rs?branch=main#c16d2f26e816f0da80f69b32a5140170b9771e4a" dependencies = [ "phf", "phf_codegen", diff --git a/Cargo.toml b/Cargo.toml index b46b29b..5ae16e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,7 +136,7 @@ openidconnect = "4.0" clap = { version = "4.5", features = ["derive", "env"] } matchit-serde = { git = "https://github.com/lennart-k/matchit-serde", rev = "f0591d13" } # TODO: Pin version -vzic-rs = { git = "https://github.com/lennart-k/vzic-rs", branch = "main" } +vtimezones-rs = { git = "https://github.com/lennart-k/vtimezones-rs", branch = "main" } ece = { version = "2.3", default-features = false, features = [ "backend-openssl", ] } diff --git a/crates/caldav/Cargo.toml b/crates/caldav/Cargo.toml index 332e752..2270f5a 100644 --- a/crates/caldav/Cargo.toml +++ b/crates/caldav/Cargo.toml @@ -42,4 +42,4 @@ headers.workspace = true tower-http.workspace = true strum.workspace = true strum_macros.workspace = true -vzic-rs.workspace = true +vtimezones-rs.workspace = true diff --git a/crates/caldav/src/calendar/methods/mkcalendar.rs b/crates/caldav/src/calendar/methods/mkcalendar.rs index c1ce2fa..4787cab 100644 --- a/crates/caldav/src/calendar/methods/mkcalendar.rs +++ b/crates/caldav/src/calendar/methods/mkcalendar.rs @@ -86,7 +86,7 @@ pub async fn route_mkcalendar( if let Some(tzid) = request.calendar_timezone_id.as_ref() { // Validate timezone id and set timezone accordingly timezone = Some( - vzic_rs::VTIMEZONES + vtimezones_rs::VTIMEZONES .get(tzid) .ok_or(rustical_dav::Error::BadRequest(format!( "Invalid timezone-id: {tzid}" diff --git a/crates/caldav/src/calendar/resource.rs b/crates/caldav/src/calendar/resource.rs index 52c083e..6704afa 100644 --- a/crates/caldav/src/calendar/resource.rs +++ b/crates/caldav/src/calendar/resource.rs @@ -201,7 +201,7 @@ impl Resource for CalendarResource { if let Some(tzid) = &timezone_id { // Validate timezone id and set timezone accordingly self.cal.timezone = Some( - vzic_rs::VTIMEZONES + vtimezones_rs::VTIMEZONES .get(tzid) .ok_or(rustical_dav::Error::BadRequest(format!( "Invalid timezone-id: {tzid}" @@ -315,6 +315,9 @@ mod tests { #[test] fn test_tzdb_version() { // Ensure that both chrono_tz and vzic_rs use the same tzdb version - assert_eq!(chrono_tz::IANA_TZDB_VERSION, vzic_rs::IANA_TZDB_VERSION); + assert_eq!( + chrono_tz::IANA_TZDB_VERSION, + vtimezones_rs::IANA_TZDB_VERSION + ); } }