@@ -52,10 +52,7 @@ pub(crate) fn etaglist_match(
5252}
5353
5454// Handle the if-headers: RFC 7232, HTTP/1.1 Conditional Requests.
55- pub ( crate ) fn http_if_match (
56- req : & Request ,
57- meta : Option < & Box < dyn DavMetaData > > ,
58- ) -> Option < StatusCode > {
55+ pub ( crate ) fn http_if_match ( req : & Request , meta : Option < & dyn DavMetaData > ) -> Option < StatusCode > {
5956 let file_modified = meta. and_then ( |m| m. modified ( ) . ok ( ) ) ;
6057
6158 if let Some ( r) = req. headers ( ) . typed_get :: < davheaders:: IfMatch > ( ) {
@@ -177,7 +174,7 @@ where
177174 match fs. metadata ( p, credentials) . await {
178175 Ok ( meta) => {
179176 // exists and may have metadata ..
180- if let Some ( mtag) = ETag :: from_meta ( meta) {
177+ if let Some ( mtag) = ETag :: from_meta ( meta. as_ref ( ) ) {
181178 tag == & mtag
182179 } else {
183180 false
@@ -210,7 +207,7 @@ where
210207// Handle both the HTTP conditional If: headers, and the webdav If: header.
211208pub ( crate ) async fn if_match < ' a , C > (
212209 req : & ' a Request ,
213- meta : Option < & ' a Box < dyn DavMetaData + ' static > > ,
210+ meta : Option < & ' a ( dyn DavMetaData + ' static ) > ,
214211 fs : & ' a ( dyn GuardedFileSystem < C > + ' static ) ,
215212 ls : & ' a Option < Box < dyn DavLockSystem + ' static > > ,
216213 path : & ' a DavPath ,
@@ -229,7 +226,7 @@ where
229226// Like if_match, but also returns all "associated state-tokens"
230227pub ( crate ) async fn if_match_get_tokens < ' a , C > (
231228 req : & ' a Request ,
232- meta : Option < & ' a Box < dyn DavMetaData + ' static > > ,
229+ meta : Option < & ' a ( dyn DavMetaData + ' static ) > ,
233230 fs : & ' a ( dyn GuardedFileSystem < C > + ' static ) ,
234231 ls : & ' a Option < Box < dyn DavLockSystem + ' static > > ,
235232 path : & ' a DavPath ,
0 commit comments