aboutsummaryrefslogtreecommitdiff
path: root/examples/example-async-support
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example-async-support')
-rw-r--r--examples/example-async-support/Cargo.lock25
-rw-r--r--examples/example-async-support/Cargo.toml4
-rw-r--r--examples/example-async-support/src/main.rs2
3 files changed, 21 insertions, 10 deletions
diff --git a/examples/example-async-support/Cargo.lock b/examples/example-async-support/Cargo.lock
index a2751be..f122f6d 100644
--- a/examples/example-async-support/Cargo.lock
+++ b/examples/example-async-support/Cargo.lock
@@ -3,6 +3,23 @@
version = 4
[[package]]
+name = "arg-picker"
+version = "0.2.0"
+dependencies = [
+ "arg-picker-macros",
+ "just_fmt",
+]
+
+[[package]]
+name = "arg-picker-macros"
+version = "0.2.0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.118",
+]
+
+[[package]]
name = "equivalent"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -60,9 +77,9 @@ dependencies = [
name = "mingling"
version = "0.5.0"
dependencies = [
+ "arg-picker",
"mingling_core",
"mingling_macros",
- "size",
]
[[package]]
@@ -146,12 +163,6 @@ dependencies = [
]
[[package]]
-name = "size"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b6709c7b6754dca1311b3c73e79fcce40dd414c782c66d88e8823030093b02b"
-
-[[package]]
name = "syn"
version = "2.0.118"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/examples/example-async-support/Cargo.toml b/examples/example-async-support/Cargo.toml
index d1b952d..a0d2a75 100644
--- a/examples/example-async-support/Cargo.toml
+++ b/examples/example-async-support/Cargo.toml
@@ -6,8 +6,8 @@ edition = "2024"
[dependencies.mingling]
path = "../../mingling"
-# Enable `parser` features
-features = ["async", "parser"]
+# Enable `picker` features
+features = ["async", "picker"]
# Import any async runtime, e.g. Tokio
[dependencies.tokio]
diff --git a/examples/example-async-support/src/main.rs b/examples/example-async-support/src/main.rs
index ac1bcc1..090602a 100644
--- a/examples/example-async-support/src/main.rs
+++ b/examples/example-async-support/src/main.rs
@@ -47,7 +47,7 @@ pack!(ResultDownloaded = String);
#[chain]
// vvvvv_ `async` keyword can be used directly here
pub async fn handle_download(args: EntryDownload) -> Next {
- let file_name = args.pick(()).unpack();
+ let file_name = args.pick_or_default(&arg![String]).unwrap();
fake_download(file_name).await.into()
}