Skip to content

Commit 6fec148

Browse files
authored
Fix clippy lint violations (#242)
1 parent 235d387 commit 6fec148

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/host.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ impl Tcp {
426426
// connection refused on the client.
427427
if let Some(b) = self.binds.get_mut(&dst.port()) {
428428
if b.deque.len() == self.server_socket_capacity {
429-
panic!("{} server socket buffer full", dst);
429+
panic!("{dst} server socket buffer full");
430430
}
431431

432432
if matches(b.bind_addr, dst) {

src/net/udp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ where
636636
}
637637

638638
if interface.is_ipv4() != addr.is_ipv4() {
639-
panic!("ip version mismatch: {:?} host: {:?}", interface, addr)
639+
panic!("ip version mismatch: {interface:?} host: {addr:?}")
640640
}
641641

642642
Ok(())

src/sim.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ mod test {
740740
let udp_socket =
741741
UdpSocket::bind((IpAddr::V4(Ipv4Addr::UNSPECIFIED), 1234)).await?;
742742
udp_socket
743-
.send_to(&[42], format!("{}:1234", host_b))
743+
.send_to(&[42], format!("{host_b}:1234"))
744744
.await
745745
.expect("sending packet should appear to work, even if partitioned");
746746

@@ -765,7 +765,7 @@ mod test {
765765
let udp_socket =
766766
UdpSocket::bind((IpAddr::V4(Ipv4Addr::UNSPECIFIED), 1234)).await?;
767767
udp_socket
768-
.send_to(&[42], format!("{}:1234", host_a))
768+
.send_to(&[42], format!("{host_a}:1234"))
769769
.await
770770
.expect("sending packet should work");
771771

0 commit comments

Comments
 (0)