-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hello,
ich use your crate in a tokio runtime and some how I get on some machines a stack overflow with this code:
let mut m3u8_files = Vec::new();
let mut entries = WalkDir::new(path).filter(move |entry| async move {
if entry.path().is_file() && entry.path().extension().is_some_and(|ext| ext == "m3u8") {
return Filtering::Continue;
}
Filtering::Ignore
});
loop {
match entries.next().await {
Some(Ok(entry)) => {
m3u8_files.push(entry.path().to_string_lossy().to_string());
}
Some(Err(e)) => {
error!(target: Target::file_mail(), "error: {e}");
break;
}
None => break,
}
}
With this not:
let mut entries = WalkDir::new(path);
while let Some(Ok(entry)) = entries.next().await {
if entry.path().is_file() && entry.path().extension().is_some_and(|ext| ext == "m3u8") {
m3u8_files.push(entry.path().to_string_lossy().to_string());
}
}
Is my code on top wrong? I though I get it correct from doc.
Metadata
Metadata
Assignees
Labels
No labels