Remove ip generation warnings
@@ -20,6 +20,7 @@ use failure::Error;
use althea_kernel_interface::KI;
extern crate althea_kernel_interface;
+use rand::distributions::Alphanumeric;
use regex::Regex;
use std::path::Path;
use std::sync::{Arc, RwLock};
@@ -46,7 +47,7 @@ pub fn linux_generate_wg_keys(config: &mut NetworkSettings) -> Result<(), Error>
}
pub fn linux_generate_mesh_ip(config: &mut NetworkSettings) -> Result<(), Error> {
- let seed: String = thread_rng().gen_ascii_chars().take(50).collect();
+ let seed: String = thread_rng().sample_iter(&Alphanumeric).take(50).collect();
let mesh_ip = ipgen::ip(&seed, "fd00::/8").unwrap();
info!("generated new ip address {}", mesh_ip);
