Skip to content

Commit

Permalink
chore: Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sugyan committed Nov 23, 2024
1 parent a225fe6 commit 8c9eee6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/concurrent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
atrium-api = "0.18.1"
atrium-xrpc-client = "0.4.0"
atrium-api = "0.24.8"
atrium-xrpc-client = "0.5.10"
clap = { version = "4.5.1", features = ["derive"] }
futures = "0.3.30"
tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread"] }
11 changes: 7 additions & 4 deletions examples/concurrent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.app
.bsky
.actor
.get_profile(atrium_api::app::bsky::actor::get_profile::Parameters {
actor: actor.parse().expect("invalid actor"),
})
.get_profile(
atrium_api::app::bsky::actor::get_profile::ParametersData {
actor: actor.parse().expect("invalid actor"),
}
.into(),
)
.await
})
})
.collect::<Vec<_>>();
let results = join_all(handles).await;
println!("{} profiles fetched!", results.len());
for (actor, result) in actors.iter().zip(results) {
println!("{actor}: {:#?}", result?);
println!("{actor}: {:?}", result?);
}
Ok(())
}

0 comments on commit 8c9eee6

Please sign in to comment.