use futures::stream::StreamExt; use unrar_async::Archive; #[cfg(feature = "tokio")] #[tokio::main] async fn main() { while let Some(entry) = Archive::new("archive.rar".into()).unwrap().list().await.unwrap().next().await { println!("{}", entry.unwrap()); } } #[cfg(feature = "async-std")] #[async_std::main] async fn main() { while let Some(entry) = Archive::new("archive.rar".into()).unwrap().list().await.unwrap().next().await { println!("{}", entry.unwrap()); } }