File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ pub(super) fn build_axum_routes() -> AxumRouter {
129129            "/favicon.ico" , 
130130            get_static ( || async  {  Redirect :: permanent ( "/-/static/favicon.ico" )  } ) , 
131131        ) 
132-         . nest ( "/-/static/ " ,  build_static_router ( ) ) 
132+         . nest ( "/-/static" ,  build_static_router ( ) ) 
133133        . route ( 
134134            "/opensearch.xml" , 
135135            get_static ( || async  {  Redirect :: permanent ( "/-/static/opensearch.xml" )  } ) , 
Original file line number Diff line number Diff line change @@ -67,8 +67,7 @@ pub(crate) fn build_static_router() -> AxumRouter {
6767            "/rustdoc-2021-12-05.css" , 
6868            get_static ( || async  {  build_static_css_response ( RUSTDOC_2021_12_05_CSS )  } ) , 
6969        ) 
70-         . nest_service ( 
71-             "/" , 
70+         . fallback_service ( 
7271            get_service ( ServeDir :: new ( "static" ) . fallback ( ServeDir :: new ( "vendor" ) ) ) 
7372                . layer ( middleware:: from_fn ( set_needed_static_headers) ) 
7473                . layer ( middleware:: from_fn ( |request,  next| async  { 
@@ -166,7 +165,12 @@ mod tests {
166165            let  web = env. web_app ( ) . await ; 
167166
168167            let  resp = web. get ( path) . await ?; 
169-             assert ! ( resp. status( ) . is_success( ) ) ; 
168+             if  !resp. status ( ) . is_success ( )  { 
169+                 let  status = resp. status ( ) ; 
170+                 dbg ! ( & resp. text( ) . await ) ; 
171+                 assert ! ( status. is_success( ) ,  "{}" ,  status) ; 
172+                 panic ! ( "as" ) ; 
173+             } 
170174            resp. assert_cache_control ( CachePolicy :: ForeverInCdnAndBrowser ,  & env. config ( ) ) ; 
171175            assert_eq ! ( 
172176                resp. headers( ) . get( "Content-Type" ) , 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments