Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 45a3e89

Browse files
committedDec 12, 2024·
update to latest iroh@main
1 parent bff7ffb commit 45a3e89

File tree

8 files changed

+18
-27
lines changed

8 files changed

+18
-27
lines changed
 

‎Cargo.lock

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

‎Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ genawaiter = { version = "0.99.1", features = ["futures03"] }
4040
hashlink = { version = "0.9.0", optional = true }
4141
hex = "0.4.3"
4242
indicatif = { version = "0.17.8", optional = true }
43-
iroh-base = { version = "0.29.0", features = ["redb"] }
43+
iroh-base = { version = "0.29.0" }
4444
iroh-io = { version = "0.6.0", features = ["stats"] }
4545
iroh-metrics = { version = "0.29.0", default-features = false }
4646
iroh = "0.29.0"
@@ -95,7 +95,7 @@ futures-util = "0.3.30"
9595
testdir = "0.9.1"
9696

9797
[features]
98-
default = ["fs-store", "net_protocol", "cli"]
98+
default = ["fs-store", "net_protocol"]
9999
downloader = ["dep:parking_lot", "tokio-util/time", "dep:hashlink"]
100100
net_protocol = ["downloader", "dep:futures-util"]
101101
fs-store = ["dep:reflink-copy", "redb", "dep:tempfile"]

‎examples/local-swarm-discovery.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ use std::path::PathBuf;
1010
use anyhow::ensure;
1111
use clap::{Parser, Subcommand};
1212
use iroh::{
13-
discovery::local_swarm_discovery::LocalSwarmDiscovery,
14-
key::{PublicKey, SecretKey},
15-
protocol::Router,
16-
Endpoint, NodeAddr, RelayMode,
13+
discovery::local_swarm_discovery::LocalSwarmDiscovery, protocol::Router, Endpoint, NodeAddr,
14+
PublicKey, RelayMode, SecretKey,
1715
};
1816
use iroh_blobs::{
1917
net_protocol::Blobs, rpc::client::blobs::WrapOption, util::local_pool::LocalPool, Hash,

‎src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use indicatif::{
1515
HumanBytes, HumanDuration, MultiProgress, ProgressBar, ProgressDrawTarget, ProgressState,
1616
ProgressStyle,
1717
};
18-
use iroh::{key::PublicKey, relay::RelayUrl, NodeAddr};
18+
use iroh::{NodeAddr, PublicKey, RelayUrl};
1919
use tokio::io::AsyncWriteExt;
2020

2121
use crate::{

‎src/downloader/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66

77
use anyhow::anyhow;
88
use futures_util::future::FutureExt;
9-
use iroh::key::SecretKey;
9+
use iroh::SecretKey;
1010

1111
use super::*;
1212
use crate::{

‎src/rpc/client/blobs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ pub struct DownloadOptions {
991991
mod tests {
992992
use std::{path::Path, time::Duration};
993993

994-
use iroh::{key::SecretKey, test_utils::DnsPkarrServer, NodeId, RelayMode};
994+
use iroh::{test_utils::DnsPkarrServer, NodeId, RelayMode, SecretKey};
995995
use node::Node;
996996
use rand::RngCore;
997997
use testresult::TestResult;

‎src/ticket.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
use std::{collections::BTreeSet, net::SocketAddr, str::FromStr};
33

44
use anyhow::Result;
5-
use iroh::{NodeId, RelayUrl};
6-
use iroh_base::{
7-
node_addr::NodeAddr,
8-
ticket::{self, Ticket},
9-
};
5+
use iroh::{NodeAddr, NodeId, RelayUrl};
6+
use iroh_base::ticket::{self, Ticket};
107
use serde::{Deserialize, Serialize};
118

129
use crate::{BlobFormat, Hash};
@@ -156,7 +153,7 @@ impl<'de> Deserialize<'de> for BlobTicket {
156153
mod tests {
157154
use std::net::SocketAddr;
158155

159-
use iroh::key::{PublicKey, SecretKey};
156+
use iroh::{PublicKey, SecretKey};
160157
use iroh_base::base32;
161158
use iroh_test::{assert_eq_hex, hexdump::parse_hexdump};
162159

‎src/util/fs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,16 @@ pub fn relative_canonicalized_path_to_string(path: impl AsRef<Path>) -> anyhow::
130130
/// at the given location.
131131
#[cfg(feature = "rpc")]
132132
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "rpc")))]
133-
pub async fn load_secret_key(key_path: PathBuf) -> anyhow::Result<iroh::key::SecretKey> {
133+
pub async fn load_secret_key(key_path: PathBuf) -> anyhow::Result<iroh::SecretKey> {
134+
use iroh::SecretKey;
134135
use tokio::io::AsyncWriteExt;
135136

136137
if key_path.exists() {
137138
let keystr = tokio::fs::read(key_path).await?;
138-
let secret_key =
139-
iroh::key::SecretKey::try_from_openssh(keystr).context("invalid keyfile")?;
139+
let secret_key = SecretKey::try_from_openssh(keystr).context("invalid keyfile")?;
140140
Ok(secret_key)
141141
} else {
142-
let secret_key = iroh::key::SecretKey::generate();
142+
let secret_key = SecretKey::generate();
143143
let ser_key = secret_key.to_openssh()?;
144144

145145
// Try to canonicalize if possible

0 commit comments

Comments
 (0)