Skip to content

Commit

Permalink
Version is too old
Browse files Browse the repository at this point in the history
  • Loading branch information
umgefahren committed Aug 5, 2024
1 parent 17a689e commit 60f9363
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/list_interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
fn main() {
let ifaces = if_addrs::get_if_addrs().unwrap();
println!("Got list of interfaces");
println!("{ifaces:#?}");
println!("{:#?}", ifaces);
}
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ mod tests {
};
let mut process = match start_cmd {
Err(why) => {
println!("couldn't start cmd {cmd} : {why}");
println!("couldn't start cmd {} : {}", cmd, why);
return String::new();
}
Ok(process) => process,
Expand Down Expand Up @@ -597,7 +597,7 @@ mod tests {
list_system_interfaces("ifconfig", "")
.lines()
.filter_map(|line| {
println!("{line}");
println!("{}", line);
if line.contains("inet ") {
let addr_s: Vec<&str> = line.split_whitespace().collect();
return Some(IpAddr::V4(Ipv4Addr::from_str(addr_s[1]).unwrap()));
Expand All @@ -611,7 +611,7 @@ mod tests {
fn test_get_if_addrs() {
let ifaces = get_if_addrs().unwrap();
println!("Local interfaces:");
println!("{ifaces:#?}");
println!("{:#?}", ifaces);
// at least one loop back address
assert!(
1 <= ifaces
Expand All @@ -636,7 +636,7 @@ mod tests {
assert!(!system_addrs.is_empty());
for addr in system_addrs {
let mut listed = false;
println!("\n checking whether {addr:?} has been properly listed \n");
println!("\n checking whether {:?} has been properly listed \n", addr);
for interface in &ifaces {
if interface.addr.ip() == addr {
listed = true;
Expand Down

0 comments on commit 60f9363

Please sign in to comment.