diff --git a/build.rs b/build.rs index 7d0ad5a..08b702c 100644 --- a/build.rs +++ b/build.rs @@ -124,7 +124,7 @@ fn export_variables(tasks: Vec) { "#[allow(dead_code)]\nmod {} {{\n", task.module_name )) { - println!("{}", err); + println!("{err}"); return; }; @@ -143,14 +143,14 @@ fn export_variables(tasks: Vec) { } for variable in variables { - if let Err(err) = dst_file.write_fmt(format_args!(" pub {}\n", variable)) { - println!("{}", err); + if let Err(err) = dst_file.write_fmt(format_args!(" pub {variable}\n")) { + println!("{err}"); break; } } if let Err(err) = dst_file.write(b"}\n") { - println!("{}", err); + println!("{err}"); }; } } diff --git a/src/infrastructure/services/random_svg_generators.rs b/src/infrastructure/services/random_svg_generators.rs index 97e98d2..5fd862a 100644 --- a/src/infrastructure/services/random_svg_generators.rs +++ b/src/infrastructure/services/random_svg_generators.rs @@ -3,7 +3,7 @@ use std::future::Future; use std::sync::OnceLock; use std::{collections::HashMap, future::IntoFuture}; -use rand::distributions::{Alphanumeric, DistString}; +use rand::distr::{Alphanumeric, SampleString}; use reqwest::Result as RequestResult; use tracing::error; @@ -124,7 +124,7 @@ async fn fetch_dicebear_svg( // TODO: Use configuration file let url = "dicebear.tools.adrien.run"; - let seed = Alphanumeric.sample_string(&mut rand::thread_rng(), 16); + let seed = Alphanumeric.sample_string(&mut rand::rng(), 16); let type_str = r#type.to_string(); let url = format!( "https://{url}/8.x/{type_str}/svg?seed={seed}&randomizeIds=true{}{}",