@@ -9,17 +9,14 @@ use crate::{
99use axum:: {
1010 body:: Body ,
1111 extract:: Extension ,
12- http:: {
13- StatusCode ,
14- header:: { CONTENT_TYPE , LAST_MODIFIED } ,
15- } ,
12+ http:: StatusCode ,
1613 response:: { IntoResponse , Response as AxumResponse } ,
1714} ;
1815use axum_extra:: {
1916 TypedHeader ,
20- headers:: { ContentType , HeaderMapExt , IfNoneMatch , LastModified } ,
17+ headers:: { ContentType , IfNoneMatch , LastModified } ,
2118} ;
22- use std:: { io , time:: SystemTime } ;
19+ use std:: time:: SystemTime ;
2320use tokio_util:: io:: ReaderStream ;
2421
2522#[ derive( Debug ) ]
@@ -44,7 +41,8 @@ impl File {
4441
4542impl File {
4643 pub fn into_response ( self , if_none_match : Option < IfNoneMatch > ) -> AxumResponse {
47- StreamingFile ( self . 0 . into ( ) . into_response ( if_none_match) )
44+ let streaming_blob: StreamingBlob = self . 0 . into ( ) ;
45+ StreamingFile ( streaming_blob) . into_response ( if_none_match)
4846 }
4947}
5048
@@ -91,7 +89,7 @@ mod tests {
9189 use super :: * ;
9290 use crate :: test:: TestEnvironment ;
9391 use chrono:: Utc ;
94- use http:: header:: CACHE_CONTROL ;
92+ use http:: header:: { CACHE_CONTROL , LAST_MODIFIED } ;
9593 use std:: rc:: Rc ;
9694
9795 #[ tokio:: test( flavor = "multi_thread" ) ]
0 commit comments