Skip to content

Commit a3174de

Browse files
committed
Fix net.rs - rsplitn() returns a reverse iterator
1 parent f68cc68 commit a3174de

File tree

1 file changed

+1
-2
lines changed
  • library/std/src/sys_common

1 file changed

+1
-2
lines changed

library/std/src/sys_common/net.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,8 @@ impl TryFrom<&str> for LookupHost {
177177
}
178178

179179
// split the string by ':' and convert the second part to u16
180-
let (port_str, host) = try_opt!(s.rsplit_once(':'), "invalid socket address");
180+
let (host, port_str) = try_opt!(s.rsplit_once(':'), "invalid socket address");
181181
let port: u16 = try_opt!(port_str.parse().ok(), "invalid port value");
182-
183182
(host, port).try_into()
184183
}
185184
}

0 commit comments

Comments
 (0)