mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 19:22:26 +00:00
minor refactoring
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::xml::TagList;
|
||||
use crate::{namespace::Namespace, xml::TagList};
|
||||
use actix_web::{
|
||||
body::BoxBody, http::header::ContentType, HttpRequest, HttpResponse, Responder, ResponseError,
|
||||
};
|
||||
@@ -56,6 +56,18 @@ pub struct MultistatusElement<T1: Serialize, T2: Serialize> {
|
||||
pub ns_ical: &'static str,
|
||||
}
|
||||
|
||||
impl<T1: Serialize, T2: Serialize> Default for MultistatusElement<T1, T2> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
responses: vec![],
|
||||
member_responses: vec![],
|
||||
ns_dav: Namespace::Dav.as_str(),
|
||||
ns_caldav: Namespace::CalDAV.as_str(),
|
||||
ns_ical: Namespace::ICal.as_str(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T1: Serialize, T2: Serialize> Responder for MultistatusElement<T1, T2> {
|
||||
type Body = BoxBody;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user