Skip to content

Commit 5a35c95

Browse files
committed
backend: fix formatting
1 parent f9cb339 commit 5a35c95

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

backend/src/routes/static_files.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* Boston, MA 02111-1307, USA.
1818
*/
1919

20-
use actix_web::{web, HttpRequest, Result};
2120
use actix_files::NamedFile;
21+
use actix_web::{web, HttpRequest, Result};
2222
use 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

4748
pub 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
}

0 commit comments

Comments
 (0)