fn should_cache(ext: Option<&OsStr>) -> bool {
    match ext {
        Some(str) => match str.to_str().unwrap().to_lowercase().as_str() {
            "dc6" | "dcc" | "tbl" => true,
            _ => false,
        },
        None => false,
    }
}
/// Check if a file should be cached to optimize future use.
/// Currently only Diablo II's original files are cached.
Check if a file should be cached to optimize future use.
Currently only Diablo II's original files are cached.
Check if a file should be cached to optimize future use . Currently only Diablo II ' s original files are cached .
fn should_cache(ext: Option<&OsStr>) -> bool {
    match ext {
        Some(str) => match str.to_str().unwrap().to_lowercase().as_str() {
            "dc6" | "dcc" | "tbl" => true,
            _ => false,
        },
        None => false,
    }
}
fn should_cache ( ext : Option < & OsStr > ) -> bool { match ext { Some ( str ) => match str . to_str ( ) . unwrap ( ) . to_lowercase ( ) . as_str ( ) { " " | " " | " " => true , _ => false , } , None => false , } }
Check if a file should be cached to optimize future use.
Check if a file should be cached to optimize future use .
ext
Option<&OsStr>
ext
Option<&OsStr>