This commit is contained in:
Mylloon 2024-12-06 09:55:55 +01:00
parent 1b44727749
commit 5bc8eba61d
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -57,11 +57,11 @@ impl Responder for Html {
/// Read a file /// Read a file
pub fn read_file(filename: FilePath, expected_file: MType) -> Option<File> { pub fn read_file(filename: FilePath, expected_file: MType) -> Option<File> {
read_file_aux(filename, expected_file) reader(filename, expected_file)
} }
#[cached] #[cached]
fn read_file_aux(filename: FilePath, expected_file: MType) -> Option<File> { fn reader(filename: FilePath, expected_file: MType) -> Option<File> {
let as_str = filename.to_string(); let as_str = filename.to_string();
Path::new(&as_str) Path::new(&as_str)
.extension() .extension()