server: prefer immutable path

This commit is contained in:
Waldemar Heinze 2022-11-25 00:14:29 +01:00 committed by GitHub
parent a3216a4550
commit a4408cfacc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,9 +25,7 @@ use std::sync::RwLock;
use tracing::info; use tracing::info;
async fn index() -> actix_web::Result<NamedFile> { async fn index() -> actix_web::Result<NamedFile> {
let mut path = PathBuf::new(); let path = PathBuf::from(r"app/index.html");
path.push("app");
path.push("index.html");
Ok(NamedFile::open(path)?) Ok(NamedFile::open(path)?)
} }