Skip to content

Commit 8b2581a

Browse files
committed
chore: update dependencies
1 parent bf29ae6 commit 8b2581a

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ strip = true
1919
opt-level = 's'
2020

2121
[workspace.package]
22-
version = "1.1.1"
22+
version = "1.1.2"
2323
edition = "2021"
2424
repository = "https://github.com/ldclabs/ic-oss"
2525
keywords = ["object_store", "storage", "oss", "s3", "icp"]

src/ic_oss/src/agent.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ use candid::{
44
};
55
use ic_agent::{Agent, Identity};
66
use ic_oss_types::format_error;
7+
use std::sync::Arc;
78

8-
pub async fn build_agent(host: &str, identity: Box<dyn Identity>) -> Result<Agent, String> {
9+
pub async fn build_agent(host: &str, identity: Arc<dyn Identity>) -> Result<Agent, String> {
910
let agent = Agent::builder()
1011
.with_url(host)
11-
.with_identity(identity)
12+
.with_arc_identity(identity)
1213
.with_verify_query_signatures(false);
1314

1415
let agent = if host.starts_with("https://") {

src/ic_oss_cli/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub struct Cli {
4949
impl Cli {
5050
async fn bucket(
5151
&self,
52-
identity: Box<dyn Identity>,
52+
identity: Arc<dyn Identity>,
5353
ic: &bool,
5454
bucket: &str,
5555
) -> Result<ic_oss::bucket::Client, String> {
@@ -62,7 +62,7 @@ impl Cli {
6262

6363
async fn cluster(
6464
&self,
65-
identity: Box<dyn Identity>,
65+
identity: Arc<dyn Identity>,
6666
ic: &bool,
6767
cluster: &str,
6868
) -> Result<ic_oss::cluster::Client, String> {
@@ -267,6 +267,7 @@ pub enum Commands {
267267
async fn main() -> Result<(), String> {
268268
let cli = Cli::parse();
269269
let identity = load_identity(&cli.identity).map_err(format_error)?;
270+
let identity = Arc::new(identity);
270271

271272
match &cli.command {
272273
Some(Commands::Identity { new, path }) => {

0 commit comments

Comments
 (0)