Cleaned up some minor issues in main.rs making the final output easier for the end user to read and comprehend

This commit is contained in:
Luke Else 2023-05-15 22:27:54 +01:00
parent 625233ab86
commit 30344b0605
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
use std::{io};
use crate::networking::Network;
use networking::Network;
mod networking;
@ -25,6 +25,10 @@ fn main() {
break;
}
let networks = Network::create_subnet(&ip_and_cidr.0, ip_and_cidr.1);
println!("IP: {}, CIDR: {}", ip_and_cidr.0.to_string(), ip_and_cidr.1);
let networks = Network::create_subnet(&ip_and_cidr.0, ip_and_cidr.1).unwrap_or_default();
for network in networks.iter() {
networking::ip::print_ip(network.clone());
}
println!("There are {} networks available", networks.len());
}

View File

@ -97,7 +97,6 @@ impl Network {
}
}
println!("{:#?}", networks);
Ok(networks)
}