Skip to content
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
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/dips/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ futures = "0.3"
http = "0.2"
prost = { workspace = true, optional = true }
ipfs-api-backend-hyper = { version = "0.6.0", features = ["with-send-sync", "with-hyper-tls"] }
ipfs-api-prelude = { version = "0.6.0", features = ["with-send-sync"] }
serde_yaml.workspace = true
serde.workspace = true
sqlx = { workspace = true, optional = true }
Expand Down
13 changes: 4 additions & 9 deletions crates/dips/src/ipfs.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// Copyright 2023-, Edge & Node, GraphOps, and Semiotic Labs.
// SPDX-License-Identifier: Apache-2.0

use std::{str::FromStr, sync::Arc};
use std::sync::Arc;

use async_trait::async_trait;
use derivative::Derivative;
use futures::TryStreamExt;
use http::Uri;
use ipfs_api_prelude::{IpfsApi, TryFromUri};
use ipfs_api_backend_hyper::{IpfsApi, TryFromUri};
use serde::Deserialize;
use tracing;

use crate::DipsError;

Expand All @@ -34,11 +32,8 @@ pub struct IpfsClient {

impl IpfsClient {
pub fn new(url: &str) -> anyhow::Result<Self> {
Ok(Self {
client: ipfs_api_backend_hyper::IpfsClient::build_with_base_uri(
Uri::from_str(url).map_err(anyhow::Error::from)?,
),
})
let client = ipfs_api_backend_hyper::IpfsClient::from_str(url)?;
Ok(Self { client })
}
}

Expand Down
Loading