1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 21:47:46 +00:00

uucore/refactor ~ fix cargo clippy complaints (iter_nth_zero)

This commit is contained in:
Roy Ivy III 2020-11-07 20:05:24 -06:00
parent 9473abf3ba
commit 66dfd73ffe

View file

@ -190,7 +190,7 @@ impl Utmpx {
pub fn canon_host(&self) -> IOResult<String> {
const AI_CANONNAME: libc::c_int = 0x2;
let host = self.host();
let host = host.split(':').nth(0).unwrap();
let host = host.split(':').next().unwrap();
let hints = libc::addrinfo {
ai_flags: AI_CANONNAME,
ai_family: 0,