1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00

use extension()

This commit is contained in:
dark64 2022-08-23 18:03:20 +02:00
parent f4789d4b04
commit 3b75eaabe5

View file

@ -15,11 +15,7 @@ fn export_stdlib() {
.into_iter()
.map(Result::unwrap)
.filter(|e| {
!e.file_type().is_dir()
&& e.file_name()
.to_str()
.map(|s| s.ends_with(".zok"))
.unwrap_or(false)
!e.file_type().is_dir() && e.path().extension().map(|e| e == "zok").unwrap_or(false)
})
{
let path: &Path = entry.path();