We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5a96fb commit 6b66749Copy full SHA for 6b66749
library/std/src/net/ip.rs
@@ -1610,9 +1610,9 @@ impl fmt::Display for Ipv6Addr {
1610
/// Write a colon-separated part of the address
1611
#[inline]
1612
fn fmt_subslice(f: &mut fmt::Formatter<'_>, chunk: &[u16]) -> fmt::Result {
1613
- if let Some(first) = chunk.first() {
+ if let Some((first, tail)) = chunk.split_first() {
1614
fmt::LowerHex::fmt(first, f)?;
1615
- for segment in &chunk[1..] {
+ for segment in tail {
1616
f.write_char(':')?;
1617
fmt::LowerHex::fmt(segment, f)?;
1618
}
0 commit comments