Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stabilize to 1.0.0 #6

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "async-walkdir"
version = "0.2.0"
version = "1.0.0"
authors = ["Ririsoft <[email protected]>"]
edition = "2018"
edition = "2021"
description = "Asynchronous directory traversal for Rust."
license = "Apache-2.0"
keywords = ["async", "walk", "directory", "recursive", "stream"]
Expand All @@ -14,8 +14,8 @@ exclude = [ "/.github/*" ]
readme = "README.md"

[dependencies]
futures-lite = "1.2"
async-fs = "1.1"
futures-lite = "2.1.0"
async-fs = "2.1.0"

[dev-dependencies]
tempfile = "3.1.0"
tempfile = "3.9.0"
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Asynchronous directory traversal for Rust.

Based on [async-fs][2] and [blocking][3],
it uses a thread pool to handle blocking IOs. Please refere to those crates for the rationale.
This crate is compatible with any async runtime based on [futures 0.3][4],
which includes [tokio][5], [async-std][6] and [smol][7].
This crate is compatible with async runtimes [tokio][5], [async-std][6], [smol][7] and potentially any runtime based on [futures 0.3][4]

We do not plan to be as feature full as [Walkdir][1] crate in the synchronous world, but
do not hesitate to open an issue or a PR.
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ where
move |state| async move {
match state {
State::Start((root, filter)) => match read_dir(root).await {
Err(e) => return Some((Err(e), State::Done)),
Ok(rd) => return walk(vec![rd], filter).await,
Err(e) => Some((Err(e), State::Done)),
Ok(rd) => walk(vec![rd], filter).await,
},
State::Walk((dirs, filter)) => return walk(dirs, filter).await,
State::Done => return None,
State::Walk((dirs, filter)) => walk(dirs, filter).await,
State::Done => None,
}
},
)
Expand Down
Loading