refactor(multiple): Clippy run

This commit is contained in:
leonardo.yvens
2016-06-04 11:21:53 -03:00
parent 0c847f7898
commit d4a095d75c
16 changed files with 50 additions and 71 deletions

View File

@@ -69,14 +69,10 @@ impl Header for Host {
}
};
let port = match idx {
Some(idx) => s[idx + 1..].parse().ok(),
None => None
};
let port = idx.and_then(|idx| s[idx + 1..].parse().ok());
match idx {
Some(idx) => s.truncate(idx),
None => ()
if let Some(idx) = idx {
s.truncate(idx)
}
Ok(Host {