Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #[derive(Debug, Clone, Deserialize)]
  2. pub struct Location {
  3. #[serde(rename="LocationName")]
  4. pub name: String,
  5. pub fullName: String,
  6. #[serde(rename="Priority")]
  7. pub priority: u32,
  8. #[serde(rename="Order")]
  9. pub order: u32,
  10. }
  11.  
  12. field from_location() -> &Vec<Location> {
  13. &self.from_location
  14. .iter()
  15. .cloned()
  16. .map(|location| {
  17. Location { fullName: get_full_station_name(location.name.as_str()).to_owned(), .. location };
  18. })
  19. .collect::<Vec<Location>>()
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement