1
0
Fork 0
mirror of https://git.42l.fr/neil/sncf.git synced 2024-04-27 11:51:51 +02:00

cargo clippy

This commit is contained in:
neil 2020-08-22 16:38:24 +02:00
parent 05566dde3d
commit dd7463fc6e
2 changed files with 2 additions and 2 deletions

View file

@ -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]

View file

@ -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",