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:
parent
625233ab86
commit
30344b0605
10
src/main.rs
10
src/main.rs
@ -1,6 +1,6 @@
|
|||||||
use std::{io};
|
use std::{io};
|
||||||
|
|
||||||
use crate::networking::Network;
|
use networking::Network;
|
||||||
|
|
||||||
|
|
||||||
mod networking;
|
mod networking;
|
||||||
@ -25,6 +25,10 @@ fn main() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
let networks = Network::create_subnet(&ip_and_cidr.0, ip_and_cidr.1);
|
let networks = Network::create_subnet(&ip_and_cidr.0, ip_and_cidr.1).unwrap_or_default();
|
||||||
println!("IP: {}, CIDR: {}", ip_and_cidr.0.to_string(), ip_and_cidr.1);
|
|
||||||
|
for network in networks.iter() {
|
||||||
|
networking::ip::print_ip(network.clone());
|
||||||
|
}
|
||||||
|
println!("There are {} networks available", networks.len());
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,6 @@ impl Network {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("{:#?}", networks);
|
|
||||||
Ok(networks)
|
Ok(networks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user