trick clippy to not raise a bad warning

This commit is contained in:
Mylloon 2024-12-06 09:18:36 +01:00
parent 47688337dd
commit 1b44727749
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -56,8 +56,12 @@ impl Responder for Html {
} }
/// Read a file /// Read a file
#[cached]
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)
}
#[cached]
fn read_file_aux(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()