mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 19:22:26 +00:00
Make tracing-actix-web optional too
This commit is contained in:
@@ -7,7 +7,7 @@ repository.workspace = true
|
||||
publish = false
|
||||
|
||||
[features]
|
||||
actix = ["dep:actix-web"]
|
||||
actix = ["dep:actix-web", "dep:tracing-actix-web"]
|
||||
|
||||
[dependencies]
|
||||
rustical_xml.workspace = true
|
||||
@@ -20,8 +20,8 @@ itertools.workspace = true
|
||||
log.workspace = true
|
||||
derive_more.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-actix-web.workspace = true
|
||||
tokio.workspace = true
|
||||
http.workspace = true
|
||||
actix-web = { workspace = true, optional = true }
|
||||
tracing-actix-web = { workspace = true, optional = true }
|
||||
headers.workspace = true
|
||||
|
||||
@@ -6,7 +6,6 @@ use headers::Header;
|
||||
use headers::{HeaderValue, IfMatch, IfNoneMatch};
|
||||
use itertools::Itertools;
|
||||
use tracing::instrument;
|
||||
use tracing_actix_web::RootSpan;
|
||||
|
||||
#[cfg(feature = "actix")]
|
||||
#[instrument(parent = root_span.id(), skip(path, req, root_span, resource_service))]
|
||||
@@ -15,7 +14,7 @@ pub async fn actix_route_delete<R: ResourceService>(
|
||||
req: actix_web::HttpRequest,
|
||||
principal: R::Principal,
|
||||
resource_service: actix_web::web::Data<R>,
|
||||
root_span: RootSpan,
|
||||
root_span: tracing_actix_web::RootSpan,
|
||||
) -> Result<actix_web::HttpResponse, R::Error> {
|
||||
let no_trash = req
|
||||
.headers()
|
||||
|
||||
@@ -10,7 +10,6 @@ use crate::xml::PropfindElement;
|
||||
use crate::xml::PropfindType;
|
||||
use rustical_xml::XmlDocument;
|
||||
use tracing::instrument;
|
||||
use tracing_actix_web::RootSpan;
|
||||
|
||||
#[cfg(feature = "actix")]
|
||||
#[instrument(parent = root_span.id(), skip(path, req, root_span, resource_service, puri))]
|
||||
@@ -21,7 +20,7 @@ pub(crate) async fn actix_route_propfind<R: ResourceService>(
|
||||
req: ::actix_web::HttpRequest,
|
||||
user: R::Principal,
|
||||
depth: Depth,
|
||||
root_span: RootSpan,
|
||||
root_span: tracing_actix_web::RootSpan,
|
||||
resource_service: ::actix_web::web::Data<R>,
|
||||
puri: ::actix_web::web::Data<R::PrincipalUri>,
|
||||
) -> Result<
|
||||
|
||||
@@ -14,7 +14,6 @@ use rustical_xml::XmlDocument;
|
||||
use rustical_xml::XmlRootTag;
|
||||
use std::str::FromStr;
|
||||
use tracing::instrument;
|
||||
use tracing_actix_web::RootSpan;
|
||||
|
||||
#[derive(XmlDeserialize, Clone, Debug)]
|
||||
#[xml(untagged)]
|
||||
@@ -68,7 +67,7 @@ pub(crate) async fn actix_route_proppatch<R: ResourceService>(
|
||||
body: String,
|
||||
req: actix_web::HttpRequest,
|
||||
principal: R::Principal,
|
||||
root_span: RootSpan,
|
||||
root_span: tracing_actix_web::RootSpan,
|
||||
resource_service: actix_web::web::Data<R>,
|
||||
) -> Result<MultistatusElement<String, String>, R::Error> {
|
||||
route_proppatch(
|
||||
|
||||
Reference in New Issue
Block a user