cargo fmt

This commit is contained in:
sharks
2018-04-15 21:15:30 -05:00
parent 811cab642e
commit 15fa093618
5 changed files with 18 additions and 13 deletions

View File

@ -8,7 +8,6 @@ extern crate serde_derive;
extern crate ipnetwork;
#[cfg(test)]
mod tests {
@ -45,7 +44,10 @@ mod tests {
let mystruct: MyStruct = ::serde_json::from_str(json_string).unwrap();
assert_eq!(mystruct.ipnetwork.ip(), Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
assert_eq!(
mystruct.ipnetwork.ip(),
Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)
);
assert_eq!(mystruct.ipnetwork.prefix(), 0);
assert_eq!(::serde_json::to_string(&mystruct).unwrap(), json_string);
@ -65,9 +67,12 @@ mod tests {
assert_eq!(mystruct.ipnetwork[0].ip(), Ipv4Addr::new(127, 1, 0, 0));
assert_eq!(mystruct.ipnetwork[0].prefix(), 24);
assert_eq!(mystruct.ipnetwork[1].ip(), Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
assert_eq!(
mystruct.ipnetwork[1].ip(),
Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)
);
assert_eq!(mystruct.ipnetwork[1].prefix(), 0);
assert_eq!(::serde_json::to_string(&mystruct).unwrap(), json_string);
}
}
}