Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
happy clippy
  • Loading branch information
dignifiedquire committed Nov 17, 2025
commit 87b0829248f8c1de79cd6310bf706d4edf0e2b77
6 changes: 3 additions & 3 deletions iroh/bench/src/iroh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
use bytes::Bytes;
use iroh::{
Endpoint, EndpointAddr, RelayMode, RelayUrl,
endpoint::{Connection, ConnectionError, RecvStream, SendStream, TransportConfig},
endpoint::{Connection, ConnectionError, QuinnTransportConfig, RecvStream, SendStream},
};
use n0_error::{Result, StackResultExt, StdResultExt};
use tracing::{trace, warn};
Expand Down Expand Up @@ -126,10 +126,10 @@ pub async fn connect_client(
Ok((endpoint, connection))
}

pub fn transport_config(max_streams: usize, initial_mtu: u16) -> TransportConfig {
pub fn transport_config(max_streams: usize, initial_mtu: u16) -> QuinnTransportConfig {
// High stream windows are chosen because the amount of concurrent streams
// is configurable as a parameter.
let mut config = TransportConfig::default();
let mut config = QuinnTransportConfig::default();
config.max_concurrent_uni_streams(max_streams.try_into().unwrap());
config.initial_mtu(initial_mtu);

Expand Down
2 changes: 1 addition & 1 deletion iroh/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub use quinn::{
ConnectionClose, ConnectionError, ConnectionStats, MtuDiscoveryConfig, OpenBi, OpenUni,
PathStats, ReadDatagram, ReadError, ReadExactError, ReadToEndError, RecvStream, ResetError,
RetryError, SendDatagramError, SendStream, ServerConfig, StoppedError, StreamId,
TransportConfig as QuinnT, VarInt, WeakConnectionHandle, WriteError,
TransportConfig as QuinnTransportConfig, VarInt, WeakConnectionHandle, WriteError,
};
pub use quinn_proto::{
FrameStats, TransportError, TransportErrorCode, UdpStats, Written,
Expand Down
7 changes: 3 additions & 4 deletions iroh/src/magicsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,8 +1382,8 @@ struct Actor {
fn bind_ip(configs: &[TransportConfig], metrics: &EndpointMetrics) -> io::Result<Vec<IpTransport>> {
let mut transports = Vec::new();
for config in configs {
match config {
TransportConfig::Ip { bind_addr } => match bind_with_fallback(*bind_addr) {
if let TransportConfig::Ip { bind_addr } = config {
match bind_with_fallback(*bind_addr) {
Ok(socket) => {
let socket = Arc::new(socket);
transports.push(IpTransport::new(
Expand All @@ -1399,8 +1399,7 @@ fn bind_ip(configs: &[TransportConfig], metrics: &EndpointMetrics) -> io::Result
return Err(err);
}
}
},
_ => {}
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions iroh/src/magicsock/mapped_addrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ pub const DEFAULT_FAKE_ADDR: SocketAddrV6 = SocketAddrV6::new(
u16::from_be_bytes([7, 10]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any meaning to these numbers? In either case, maybe a short comment on how they're chosen would be nice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are the same numbers we use for the other fake addrs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a comment

u16::from_be_bytes([81, 11]),
u16::from_be_bytes([0, 0]),
std::u16::MAX,
std::u16::MAX,
std::u16::MAX,
std::u16::MAX,
u16::MAX,
u16::MAX,
u16::MAX,
u16::MAX,
),
MAPPED_PORT,
0,
Expand Down