Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Commit 00dd906

Browse files
committed
Rustfmt
1 parent 8886447 commit 00dd906

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

src/unixfs/cat.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use crate::{Error, Ipfs, IpfsTypes};
22
use async_stream::stream;
33
use cid::Cid;
4+
use core::fmt;
5+
use core::ops::Range;
46
use futures::stream::Stream;
57
use ipfs_unixfs::file::{visit::IdleFileVisit, FileReadFailed};
68
use std::borrow::Borrow;
7-
use core::fmt;
8-
use core::ops::Range;
99

1010
/// IPFS cat operation, producing a stream of file bytes. This is generic over the different kinds
1111
/// of ways to own an `Ipfs` value in order to support both operating with borrowed `Ipfs` value

unixfs/examples/add.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use cid::Cid;
2-
use ipfs_unixfs::file::adder::FileAdder;
32
use core::fmt;
4-
use std::io::{BufRead, BufReader};
53
use core::time::Duration;
4+
use ipfs_unixfs::file::adder::FileAdder;
5+
use std::io::{BufRead, BufReader};
66

77
fn main() {
88
// read stdin, maybe produce stdout car?

unixfs/examples/cat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use cid::Cid;
2-
use ipfs_unixfs::file::{visit::IdleFileVisit, FileReadFailed};
32
use core::convert::TryFrom;
43
use core::fmt;
4+
use ipfs_unixfs::file::{visit::IdleFileVisit, FileReadFailed};
55
use std::io::{Error as IoError, Read, Write};
66
use std::path::PathBuf;
77

unixfs/src/dagpb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
///! dag-pb support operations. Placing this module inside unixfs module is a bit unfortunate but
22
///! follows from the inseparability of dag-pb and UnixFS.
33
use crate::pb::PBNode;
4-
use std::borrow::Cow;
54
use core::convert::TryFrom;
5+
use std::borrow::Cow;
66

77
/// Extracts the PBNode::Data field from the block as it appears on the block.
88
pub fn node_data(block: &[u8]) -> Result<Option<&[u8]>, quick_protobuf::Error> {

unixfs/src/dir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ mod tests {
216216
use super::{resolve, MaybeResolved};
217217
use crate::test_support::FakeBlockstore;
218218
use cid::Cid;
219-
use hex_literal::hex;
220219
use core::convert::TryFrom;
220+
use hex_literal::hex;
221221

222222
#[test]
223223
fn resolve_paths_from_plain_dagpb() {

unixfs/src/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
///! [`ipfs_unixfs::walk::Walker`] should typically be used for accessing file content.
55
use crate::pb::ParsingFailed;
66
use crate::{InvalidCidInLink, Metadata, UnexpectedNodeType};
7-
use std::borrow::Cow;
87
use core::fmt;
8+
use std::borrow::Cow;
99

1010
/// Low level UnixFS file descriptor reader support.
1111
mod reader;

unixfs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
//! `ipfs_unixfs::walk::Walker`. To resolve `IpfsPath` segments over dag-pb nodes,
99
//! `ipfs_unixfs::resolve` should be used.
1010
11-
use std::borrow::Cow;
1211
use core::fmt;
12+
use std::borrow::Cow;
1313

1414
/// File support.
1515
pub mod file;

unixfs/src/pb.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use quick_protobuf::{errors::Result as ProtobufResult, Writer, WriterBackend};
2-
use std::borrow::Cow;
31
use core::convert::TryFrom;
42
use core::fmt;
53
use core::ops::Range;
4+
use quick_protobuf::{errors::Result as ProtobufResult, Writer, WriterBackend};
5+
use std::borrow::Cow;
66

77
pub(crate) mod merkledag;
88
pub(crate) use merkledag::PBLink;
@@ -200,9 +200,9 @@ where
200200
mod test {
201201

202202
use super::{FlatUnixFs, PBNode, UnixFs, UnixFsType};
203+
use core::convert::TryFrom;
203204
use hex_literal::hex;
204205
use std::borrow::Cow;
205-
use core::convert::TryFrom;
206206

207207
#[test]
208208
fn parse_content() {

0 commit comments

Comments
 (0)