Skip to content

Commit c3d27af

Browse files
committed
chore: run cargo fmt to make CI happy
1 parent 1ace32c commit c3d27af

File tree

10 files changed

+25
-25
lines changed

10 files changed

+25
-25
lines changed

browser-echo/src/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use anyhow::Result;
22
use async_channel::Sender;
33
use iroh::{
4+
Endpoint, NodeId,
45
endpoint::Connection,
56
protocol::{AcceptError, ProtocolHandler, Router},
6-
Endpoint, NodeId,
77
};
8-
use n0_future::{boxed::BoxStream, task, Stream, StreamExt};
8+
use n0_future::{Stream, StreamExt, boxed::BoxStream, task};
99
use serde::{Deserialize, Serialize};
1010
use tokio::sync::broadcast;
1111
use tokio_stream::wrappers::BroadcastStream;

browser-echo/src/wasm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use n0_future::{Stream, StreamExt};
33
use serde::Serialize;
44
use tracing::level_filters::LevelFilter;
55
use tracing_subscriber_wasm::MakeConsoleWriter;
6-
use wasm_bindgen::{prelude::wasm_bindgen, JsError, JsValue};
7-
use wasm_streams::{readable::sys::ReadableStream as JsReadableStream, ReadableStream};
6+
use wasm_bindgen::{JsError, JsValue, prelude::wasm_bindgen};
7+
use wasm_streams::{ReadableStream, readable::sys::ReadableStream as JsReadableStream};
88

99
use crate::node;
1010

dumbpipe-web/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77
use anyhow::Context;
88
use bytes::Bytes;
99
use clap::Parser;
10-
use http_body_util::{combinators::BoxBody, BodyExt, Full};
10+
use http_body_util::{BodyExt, Full, combinators::BoxBody};
1111
use hyper::client::conn::http1::Builder;
1212
use hyper::server::conn::http1;
1313
use hyper::service::service_fn;

extism/iroh-extism-host-functions/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::{path::PathBuf, str::FromStr};
22

3-
use anyhow::{anyhow, Result};
3+
use anyhow::{Result, anyhow};
44
use extism::*;
55
use futures::stream::StreamExt;
6-
use iroh::{protocol::Router, Endpoint, NodeId};
6+
use iroh::{Endpoint, NodeId, protocol::Router};
77
use iroh_blobs::{api::downloader::Shuffled, net_protocol::Blobs, store::fs::FsStore};
88

99
const IROH_EXTISM_DATA_DIR: &str = "iroh-extism";

frosty/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use clap::Parser;
22
use frost_ed25519::{
3-
self as frost,
3+
self as frost, Ciphersuite, Ed25519ScalarField, Ed25519Sha512, Field, Group, Identifier,
4+
SigningPackage,
45
keys::{IdentifierList, KeyPackage, PublicKeyPackage, SecretShare},
5-
Ciphersuite, Ed25519ScalarField, Ed25519Sha512, Field, Group, Identifier, SigningPackage,
66
};
77
use futures::StreamExt;
88
use iroh::{
9+
PublicKey, SecretKey, Watcher,
910
discovery::{dns::DnsDiscovery, pkarr::PkarrPublisher},
1011
endpoint::{RecvStream, SendStream},
11-
PublicKey, SecretKey, Watcher,
1212
};
1313
use rand::thread_rng;
1414
use sha2::{Digest, Sha512};

iroh-automerge/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anyhow::Result;
2-
use automerge::{transaction::Transactable, Automerge, ReadDoc};
2+
use automerge::{Automerge, ReadDoc, transaction::Transactable};
33
use clap::Parser;
4-
use iroh::{protocol::Router, Endpoint};
4+
use iroh::{Endpoint, protocol::Router};
55
use protocol::IrohAutomergeProtocol;
66
use tokio::sync::mpsc;
77

iroh-automerge/src/protocol.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ use std::sync::Arc;
22

33
use anyhow::Result;
44
use automerge::{
5-
sync::{self, SyncDoc},
65
Automerge,
6+
sync::{self, SyncDoc},
77
};
88
use iroh::{
99
endpoint::{Connection, RecvStream, SendStream},
1010
protocol::{AcceptError, ProtocolHandler},
1111
};
1212
use serde::{Deserialize, Serialize};
13-
use tokio::sync::{mpsc, Mutex};
13+
use tokio::sync::{Mutex, mpsc};
1414

1515
#[derive(Debug, Clone)]
1616
pub struct IrohAutomergeProtocol {

iroh-gateway/src/cert_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use std::path::Path;
33

44
use anyhow::{Context, Result};
5-
use rustls::pki_types::{pem::PemObject, CertificateDer, PrivateKeyDer};
5+
use rustls::pki_types::{CertificateDer, PrivateKeyDer, pem::PemObject};
66

77
pub fn load_certs<'a>(filename: impl AsRef<Path>) -> Result<Vec<CertificateDer<'a>>> {
88
println!("loading certs from {}", filename.as_ref().display());

iroh-gateway/src/main.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,37 @@ use std::{
77
use anyhow::Context;
88
use args::CertMode;
99
use axum::{
10+
Extension, Router,
1011
body::Body,
1112
extract::Path,
12-
http::{header, Method, Request, StatusCode},
13+
http::{Method, Request, StatusCode, header},
1314
response::{IntoResponse, Response},
1415
routing::get,
15-
Extension, Router,
1616
};
17-
use bao_tree::{io::fsm::BaoContentItem, ChunkNum};
18-
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
17+
use bao_tree::{ChunkNum, io::fsm::BaoContentItem};
18+
use base64::{Engine, engine::general_purpose::URL_SAFE_NO_PAD};
1919
use bytes::Bytes;
2020
use clap::Parser;
2121
use derive_more::Deref;
22-
use futures::{pin_mut, StreamExt};
22+
use futures::{StreamExt, pin_mut};
2323
use hyper::body::Incoming;
2424
use hyper_util::rt::{TokioExecutor, TokioIo};
25-
use iroh::{discovery::dns::DnsDiscovery, endpoint::Connection, Endpoint, NodeAddr, NodeId};
25+
use iroh::{Endpoint, NodeAddr, NodeId, discovery::dns::DnsDiscovery, endpoint::Connection};
2626
use iroh_base::ticket::NodeTicket;
2727
use iroh_blobs::{
28+
BlobFormat, Hash,
2829
format::collection::Collection,
2930
get::fsm::{BlobContentNext, ConnectedNext, DecodeError, EndBlobNext},
30-
protocol::{ChunkRangesSeq, ALPN},
31+
protocol::{ALPN, ChunkRangesSeq},
3132
ticket::BlobTicket,
32-
BlobFormat, Hash,
3333
};
3434
use lru::LruCache;
3535
use mime::Mime;
3636
use mime_classifier::MimeClassifier;
3737
use range_collections::RangeSet2;
3838
use ranges::parse_byte_range;
3939
use tokio::net::TcpListener;
40-
use tokio_rustls_acme::{caches::DirCache, tokio_rustls::TlsAcceptor, AcmeConfig};
40+
use tokio_rustls_acme::{AcmeConfig, caches::DirCache, tokio_rustls::TlsAcceptor};
4141
use tower_http::cors::{AllowHeaders, AllowOrigin, CorsLayer};
4242
use tower_service::Service;
4343
use url::Url;

iroh-gateway/src/ranges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use bao_tree::ChunkNum;
66
use bytes::Bytes;
77
use headers::{HeaderMapExt, Range};
88
use hyper::Request;
9-
use range_collections::{range_set::RangeSetRange, RangeSet2};
9+
use range_collections::{RangeSet2, range_set::RangeSetRange};
1010

1111
/// Given a range specified as arbitrary range bounds, normalize it into a range
1212
/// that has inclusive start and exclusive end.

0 commit comments

Comments
 (0)