Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Debug, Clone, Deserialize)]
- pub struct Location {
- #[serde(rename="LocationName")]
- pub name: String,
- pub fullName: String,
- #[serde(rename="Priority")]
- pub priority: u32,
- #[serde(rename="Order")]
- pub order: u32,
- }
- field from_location() -> &Vec<Location> {
- &self.from_location
- .iter()
- .cloned()
- .map(|location| {
- Location { fullName: get_full_station_name(location.name.as_str()).to_owned(), .. location };
- })
- .collect::<Vec<Location>>()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement