fn find_artifact(entries: ReadDir, artifact_name: &str) -> Option<PathBuf> {
    let mut entry: Vec<_> = entries
        .into_iter()
        .flatten()
        .filter(|entry| entry.file_name().to_str() == Some(artifact_name))
        .collect();

    Some(entry.pop()?.path())
}
// There is no distinction between files and folders
There is no distinction between files and folders
There is no distinction between files and folders
fn find_artifact(entries: ReadDir, artifact_name: &str) -> Option<PathBuf> {
    let mut entry: Vec<_> = entries
        .into_iter()
        .flatten()
        .filter(|entry| entry.file_name().to_str() == Some(artifact_name))
        .collect();
    Some(entry.pop()?.path())
}
fn find_artifact ( entries : ReadDir , artifact_name : & str ) -> Option < PathBuf > { let mut entry : Vec < _ > = entries . into_iter ( ) . flatten ( ) . filter ( | entry | entry . file_name ( ) . to_str ( ) == Some ( artifact_name ) ) . collect ( ) ; Some ( entry . pop ( ) ? . path ( ) ) }
There is no distinction between files and folders
There is no distinction between files and folders
entries
ReadDir
artifact_name
&str
entries
ReadDir
artifact_name
&str