From a4408cfaccd905e98913ce9765bda0b879793720 Mon Sep 17 00:00:00 2001 From: Waldemar Heinze <1307809+wheinze@users.noreply.github.com> Date: Fri, 25 Nov 2022 00:14:29 +0100 Subject: [PATCH] server: prefer immutable path --- server/src/infra/tcp_server.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/src/infra/tcp_server.rs b/server/src/infra/tcp_server.rs index ee11596..dd808f6 100644 --- a/server/src/infra/tcp_server.rs +++ b/server/src/infra/tcp_server.rs @@ -25,9 +25,7 @@ use std::sync::RwLock; use tracing::info; async fn index() -> actix_web::Result { - let mut path = PathBuf::new(); - path.push("app"); - path.push("index.html"); + let path = PathBuf::from(r"app/index.html"); Ok(NamedFile::open(path)?) }