From 41d68f9ae06994191eda994e596f5f89b52a4f2f Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:30:01 +0200 Subject: [PATCH] code cleanup --- crates/dav/src/depth_extractor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/dav/src/depth_extractor.rs b/crates/dav/src/depth_extractor.rs index 0e4973f..a30026f 100644 --- a/crates/dav/src/depth_extractor.rs +++ b/crates/dav/src/depth_extractor.rs @@ -4,7 +4,7 @@ use thiserror::Error; #[derive(Error, Debug)] #[error("Invalid Depth header")] -pub struct InvalidDepthHeader {} +pub struct InvalidDepthHeader; impl ResponseError for InvalidDepthHeader { fn status_code(&self) -> actix_web::http::StatusCode { @@ -27,7 +27,7 @@ impl TryFrom<&[u8]> for Depth { b"0" => Ok(Depth::Zero), b"1" => Ok(Depth::One), b"Infinity" | b"infinity" => Ok(Depth::Infinity), - _ => Err(InvalidDepthHeader {}), + _ => Err(InvalidDepthHeader), } } }