From a135f53659620a34dc35654b9580595473b257f6 Mon Sep 17 00:00:00 2001 From: Theo Beers <32523293+theodore-s-beers@users.noreply.github.com> Date: Sat, 5 Nov 2022 09:40:42 +0100 Subject: [PATCH] Fix compiler warning --- lua-api-crates/filesystem/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua-api-crates/filesystem/src/lib.rs b/lua-api-crates/filesystem/src/lib.rs index 25dec2db2..4a1e90fa4 100644 --- a/lua-api-crates/filesystem/src/lib.rs +++ b/lua-api-crates/filesystem/src/lib.rs @@ -15,7 +15,7 @@ async fn read_dir<'lua>(_: &'lua Lua, path: String) -> mlua::Result> .await .map_err(|e| mlua::Error::external(e))?; let mut entries = vec![]; - for entry in dir.next().await { + while let Some(entry) = dir.next().await { let entry = entry.map_err(|e| mlua::Error::external(e))?; if let Some(utf8) = entry.path().to_str() { entries.push(utf8.to_string());