File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1717 * Boston, MA 02111-1307, USA.
1818 */
1919
20- use actix_web:: { web, HttpRequest , Result } ;
2120use actix_files:: NamedFile ;
21+ use actix_web:: { web, HttpRequest , Result } ;
2222use std:: path:: PathBuf ;
2323
2424// Define static file serving path based on build configuration
@@ -31,7 +31,8 @@ async fn serve_gzip_static(req: HttpRequest) -> Result<NamedFile> {
3131
3232 #[ cfg( debug_assertions) ]
3333 let static_serve_from = {
34- let env = std:: env:: var ( "WARP_CHARGER_GIT_URL" ) . unwrap_or_else ( |_| "warp-charger" . to_string ( ) ) ;
34+ let env =
35+ std:: env:: var ( "WARP_CHARGER_GIT_URL" ) . unwrap_or_else ( |_| "warp-charger" . to_string ( ) ) ;
3536 format ! ( "{env}/firmwares/static_html/" )
3637 } ;
3738 #[ cfg( not( debug_assertions) ) ]
@@ -45,8 +46,5 @@ async fn serve_gzip_static(req: HttpRequest) -> Result<NamedFile> {
4546}
4647
4748pub fn configure ( cfg : & mut web:: ServiceConfig ) {
48- cfg. service (
49- web:: resource ( "/static/{filename:.*}" )
50- . route ( web:: get ( ) . to ( serve_gzip_static) )
51- ) ;
49+ cfg. service ( web:: resource ( "/static/{filename:.*}" ) . route ( web:: get ( ) . to ( serve_gzip_static) ) ) ;
5250}
You can’t perform that action at this time.
0 commit comments