Clean up some things as reported by clippy

This commit is contained in:
Abhishek Chanda
2016-12-21 09:46:32 +00:00
parent 21dfeaccfc
commit 021bb38573
3 changed files with 3 additions and 5 deletions

View File

@ -7,7 +7,7 @@ pub enum IpNetworkError {
InvalidCidrFormat(String),
}
pub fn cidr_parts<'a>(cidr: &'a str) -> Result<(&'a str, &'a str), IpNetworkError> {
pub fn cidr_parts(cidr: &str) -> Result<(&str, &str), IpNetworkError> {
let parts = cidr.split('/').collect::<Vec<&str>>();
if parts.len() == 2 {
Ok((parts[0], parts[1]))