diff --git a/src/bind.rs b/src/bind.rs index 11c33c7..0344126 100644 --- a/src/bind.rs +++ b/src/bind.rs @@ -4,7 +4,7 @@ use std::net::Ipv6Addr; use std::str::FromStr; use ipnet::Ipv6Net; -pub(crate) fn get_ipv6_addresses_from_config(filepath: &'static str, ipv6_addresses: &mut Vec, prefix_size: &u8) { +pub(crate) fn get_ipv6_addresses_from_config(filepath: &'static str, ipv6_addresses: &mut Vec, prefix_size: u8) { let bind_db_file = File::open(filepath) .expect(&*format!("Bind DB File under {} not found.", filepath)); let reader = BufReader::new(bind_db_file); @@ -14,7 +14,7 @@ pub(crate) fn get_ipv6_addresses_from_config(filepath: &'static str, ipv6_addres continue; } let ipv6_str = line.as_ref().unwrap().split_whitespace().last().unwrap(); - ipv6_addresses.push(Ipv6Net::new(Ipv6Addr::from_str(ipv6_str).unwrap(), *prefix_size).unwrap()); + ipv6_addresses.push(Ipv6Net::new(Ipv6Addr::from_str(ipv6_str).unwrap(), prefix_size).unwrap()); } } diff --git a/src/main.rs b/src/main.rs index 4a06b73..edea9c2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,10 +11,10 @@ use std::str::FromStr; fn main() { //new program - let prefix_size: u8 = 56; + let prefix_size: u8 = 64; let mut ipv6_addresses: Vec = vec![]; - bind::get_ipv6_addresses_from_config("src/db.maximizzar.io", &mut ipv6_addresses, &prefix_size); + bind::get_ipv6_addresses_from_config("src/db.maximizzar.io", &mut ipv6_addresses, prefix_size); for ipv6_address in ipv6_addresses { println!("{}", ipv6_address); }