mirror of
https://git.42l.fr/neil/sncf.git
synced 2024-05-09 17:26:36 +02:00
cargo clippy
This commit is contained in:
parent
05566dde3d
commit
dd7463fc6e
|
@ -258,7 +258,7 @@ pub fn gen_name() -> String {
|
|||
format!("{}{}", list_rand(&ADJ_LIST), list_rand(&NAME_LIST))
|
||||
}
|
||||
|
||||
pub fn list_rand(list: &Vec<String>) -> &String {
|
||||
pub fn list_rand(list: &[String]) -> &String {
|
||||
let mut rng = rand::thread_rng();
|
||||
let roll = rng.gen_range(0, list.len() - 1);
|
||||
&list[roll]
|
||||
|
|
|
@ -64,7 +64,7 @@ pub fn check_new_form(route: &str, body: &web::Bytes) -> u64 {
|
|||
}
|
||||
}
|
||||
|
||||
const BLOCKED_ROUTES: &'static [&'static str] = &[
|
||||
const BLOCKED_ROUTES: &[&str] = &[
|
||||
"/apps/settings",
|
||||
"/login",
|
||||
"/settings",
|
||||
|
|
Loading…
Reference in a new issue