Migrate ical-rs to caldata-rs

This commit is contained in:
Lennart K
2026-01-22 11:01:00 +01:00
parent 11a61cf8b1
commit d5892ab56b
27 changed files with 93 additions and 94 deletions

View File

@@ -4,11 +4,12 @@ use axum::{
extract::{Path, State},
response::{IntoResponse, Response},
};
use http::StatusCode;
use ical::{
parser::{Component, ComponentMut, vcard},
property::ContentLine,
use caldata::{
VcardParser,
component::{Component, ComponentMut},
parser::ContentLine,
};
use http::StatusCode;
use rustical_store::{Addressbook, AddressbookStore, SubscriptionStore, auth::Principal};
use tracing::instrument;
@@ -23,7 +24,7 @@ pub async fn route_import<AS: AddressbookStore, S: SubscriptionStore>(
return Err(Error::Unauthorized);
}
let parser = vcard::VcardParser::from_slice(body.as_bytes());
let parser = VcardParser::from_slice(body.as_bytes());
let mut objects = vec![];
for res in parser {

View File

@@ -2,8 +2,8 @@ use crate::{
address_object::AddressObjectPropWrapperName,
addressbook::methods::report::addressbook_query::PropFilterElement,
};
use caldata::parser::ContentLine;
use derive_more::{From, Into};
use ical::property::ContentLine;
use rustical_dav::xml::{PropfindType, TextMatchElement};
use rustical_ical::{AddressObject, UtcDateTime};
use rustical_xml::{ValueDeserialize, XmlDeserialize, XmlRootTag};

View File

@@ -1,5 +1,5 @@
use super::{Allof, ParamFilterElement};
use ical::{parser::Component, property::ContentLine};
use caldata::{component::Component, parser::ContentLine};
use rustical_dav::xml::TextMatchElement;
use rustical_ical::AddressObject;
use rustical_xml::XmlDeserialize;