Skip to content

Commit f2660f6

Browse files
committed
more shorter imports
1 parent 261a03a commit f2660f6

File tree

7 files changed

+18
-19
lines changed

7 files changed

+18
-19
lines changed

iroh-cli/src/commands/blobs.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,18 @@ use iroh::{
2121
get::{db::DownloadProgress, progress::BlobProgress, Stats},
2222
net_protocol::DownloadMode,
2323
provider::AddProgress,
24-
rpc::client::blobs::{
25-
BlobInfo, BlobStatus, CollectionInfo, DownloadOptions, IncompleteBlobInfo, WrapOption,
26-
},
2724
store::{
2825
ConsistencyCheckProgress, ExportFormat, ExportMode, ReportLevel, ValidateProgress,
2926
},
3027
util::SetTagOption,
3128
BlobFormat, Hash, HashAndFormat, Tag,
3229
},
33-
client::Iroh,
30+
client::{
31+
blobs::{
32+
BlobInfo, BlobStatus, CollectionInfo, DownloadOptions, IncompleteBlobInfo, WrapOption,
33+
},
34+
Iroh,
35+
},
3436
net::{key::PublicKey, relay::RelayUrl, NodeAddr},
3537
};
3638
use tokio::io::AsyncWriteExt;

iroh-cli/src/commands/docs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ use futures_lite::{Stream, StreamExt};
1717
use indicatif::{HumanBytes, HumanDuration, MultiProgress, ProgressBar, ProgressStyle};
1818
use iroh::{
1919
base::{base32::fmt_short, node_addr::AddrInfoOptions},
20-
blobs::{provider::AddProgress, rpc::client::blobs::WrapOption, util::SetTagOption, Hash, Tag},
20+
blobs::{provider::AddProgress, util::SetTagOption, Hash, Tag},
21+
client::blobs::WrapOption,
2122
client::{
2223
docs::{Doc, Entry, LiveEvent, Origin, ShareMode},
2324
Iroh,

iroh/src/client/blobs.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub type Client =
88
iroh_blobs::rpc::client::blobs::Client<BoxedServiceConnection<RpcService>, RpcService>;
99

1010
pub use iroh_blobs::rpc::client::blobs::{
11-
AddDirOpts, AddFileOpts, AddOutcome, AddProgress, AddReaderOpts, BlobInfo, DownloadMode,
12-
DownloadOptions, DownloadOutcome, DownloadProgress, IncompleteBlobInfo, Reader, WrapOption,
11+
AddDirOpts, AddFileOpts, AddOutcome, AddProgress, AddReaderOpts, BlobInfo, BlobStatus,
12+
CollectionInfo, DownloadMode, DownloadOptions, DownloadOutcome, DownloadProgress,
13+
IncompleteBlobInfo, Reader, WrapOption,
1314
};

iroh/src/client/docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ impl Entry {
487487
let client: RpcClient = client.into().clone();
488488
let client: quic_rpc::RpcClient<iroh_blobs::rpc::proto::RpcService, _, _> = client.map();
489489

490-
iroh_blobs::rpc::client::blobs::Reader::from_rpc_read(&client, self.content_hash())
490+
blobs::Reader::from_rpc_read(&client, self.content_hash())
491491
.await?
492492
.read_to_bytes()
493493
.await

iroh/src/node.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,15 +495,11 @@ fn node_address_for_storage(info: RemoteInfo) -> Option<NodeAddr> {
495495

496496
#[cfg(test)]
497497
mod tests {
498+
use crate::client::blobs::{AddOutcome, WrapOption};
498499
use anyhow::{bail, Context};
499500
use bytes::Bytes;
500501
use iroh_base::{node_addr::AddrInfoOptions, ticket::BlobTicket};
501-
use iroh_blobs::{
502-
provider::AddProgress,
503-
rpc::client::blobs::{AddOutcome, WrapOption},
504-
util::SetTagOption,
505-
BlobFormat,
506-
};
502+
use iroh_blobs::{provider::AddProgress, util::SetTagOption, BlobFormat};
507503
use iroh_net::{key::SecretKey, relay::RelayMode, test_utils::DnsPkarrServer, NodeAddr};
508504

509505
use super::*;

iroh/src/util/fs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ use std::{
77

88
use anyhow::{bail, Context};
99
use bytes::Bytes;
10-
use iroh_blobs::rpc::client::blobs::WrapOption;
1110
use iroh_net::key::SecretKey;
1211
use tokio::io::AsyncWriteExt;
1312
use walkdir::WalkDir;
1413

14+
use crate::client::blobs::WrapOption;
15+
1516
/// A data source
1617
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)]
1718
pub struct DataSource {

iroh/tests/batch.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ use std::{io, time::Duration};
33
use bao_tree::blake3;
44
use bytes::Bytes;
55
use futures_lite::StreamExt;
6+
use iroh::client::blobs::{AddDirOpts, WrapOption};
67
use iroh::node::GcPolicy;
7-
use iroh_blobs::{
8-
rpc::client::blobs::{AddDirOpts, WrapOption},
9-
store::mem::Store,
10-
};
8+
use iroh_blobs::store::mem::Store;
119

1210
async fn create_node() -> anyhow::Result<(iroh::node::Node<Store>, async_channel::Receiver<()>)> {
1311
let (gc_send, gc_recv) = async_channel::unbounded();

0 commit comments

Comments
 (0)