1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use super::dependencies::*;
pub struct Transport;
impl Transport {
pub fn manufacturer() -> &'static str {
get_random_element(MANUFACTURERS.iter())
}
pub fn car() -> &'static str {
get_random_element(CARS.iter())
}
pub fn airplane() -> &'static str {
get_random_element(AIRPLANES.iter())
}
pub fn vehicle_registration_code(locale: Option<Locale>) -> &'static str {
match locale {
Some(locale) => &VRC_BY_LOCALES.get(locale.get_data().lang_code.as_str()).unwrap(),
None => get_random_element(VR_CODES.iter())
}
}
}