Skip to content

Commit

Permalink
stabilize to 1.0.0
Browse files Browse the repository at this point in the history
API is being used for 3 years and has proven to be solid.
It is time for 1.0.0.

Upgrade dependencies to major versions.
  • Loading branch information
ririsoft committed Jan 4, 2024
1 parent 52d9af9 commit 4d37eaa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "async-walkdir"
version = "0.2.0"
version = "1.0.0"
authors = ["Ririsoft <[email protected]>"]
edition = "2018"
description = "Asynchronous directory traversal for Rust."
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

0 comments on commit 4d37eaa

Please sign in to comment.