@@ -17,13 +17,13 @@ use http_body_util::BodyExt;
1717use crate :: body:: { Body , StreamBody } ;
1818use crate :: davheaders;
1919use crate :: davpath:: DavPath ;
20- use crate :: util:: { dav_method , DavMethod , DavMethodSet } ;
20+ use crate :: util:: { DavMethod , DavMethodSet , dav_method } ;
2121
22+ use crate :: DavResult ;
2223use crate :: errors:: DavError ;
2324use crate :: fs:: * ;
2425use crate :: ls:: * ;
25- use crate :: voidfs:: { is_voidfs, VoidFs } ;
26- use crate :: DavResult ;
26+ use crate :: voidfs:: { VoidFs , is_voidfs} ;
2727
2828/// WebDAV request handler.
2929///
@@ -459,10 +459,10 @@ where
459459 } ;
460460
461461 // debug when running the webdav litmus tests.
462- if log_enabled ! ( log:: Level :: Debug ) {
463- if let Some ( t) = req. headers ( ) . typed_get :: < davheaders:: XLitmus > ( ) {
464- debug ! ( "X-Litmus: {t:?}" ) ;
465- }
462+ if log_enabled ! ( log:: Level :: Debug )
463+ && let Some ( t) = req. headers ( ) . typed_get :: < davheaders:: XLitmus > ( )
464+ {
465+ debug ! ( "X-Litmus: {t:?}" ) ;
466466 }
467467
468468 // translate HTTP method to Webdav method.
@@ -497,15 +497,15 @@ where
497497 }
498498
499499 // see if method is allowed.
500- if let Some ( ref a) = self . allow {
501- if !a. contains ( method) {
502- debug ! (
503- "method {} not allowed on request {}" ,
504- req . method ( ) ,
505- req. uri ( )
506- ) ;
507- return Err ( DavError :: StatusClose ( StatusCode :: METHOD_NOT_ALLOWED ) ) ;
508- }
500+ if let Some ( ref a) = self . allow
501+ && !a. contains ( method)
502+ {
503+ debug ! (
504+ "method {} not allowed on request {}" ,
505+ req. method ( ) ,
506+ req . uri ( )
507+ ) ;
508+ return Err ( DavError :: StatusClose ( StatusCode :: METHOD_NOT_ALLOWED ) ) ;
509509 }
510510
511511 // make sure the request path is valid.
0 commit comments