From af5409ea281243e04f12b831fe7ad195b97ec0aa Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 26 Jan 2019 19:10:15 +0400 Subject: Sat, 26 Jan 2019 19:10:15 +0400 Signed-off-by: Valentin Popov --- src/main.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 881237d..061c7ce 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,9 +13,9 @@ use xml::reader::{EventReader, XmlEvent}; #[derive(Serialize, Clone)] struct Record { - externalId: String, - meetingId: String, - meetingName: String, + external_id: String, + meeting_id: String, + meeting_name: String, } fn main() { @@ -25,9 +25,9 @@ fn main() { let parser = EventReader::new(file); let mut data = Record { - externalId: "".to_string(), - meetingId: "".to_string(), - meetingName: "".to_string(), + external_id: "".to_string(), + meeting_id: "".to_string(), + meeting_name: "".to_string(), }; for element in parser { @@ -42,11 +42,11 @@ fn main() { let value: String = attribute.value.to_string(); if name == "externalId" { - data.externalId = value; + data.external_id = value; } else if name == "meetingId" { - data.meetingId = value; + data.meeting_id = value; } else if name == "meetingName" { - data.meetingName = value; + data.meeting_name = value; } } } -- cgit v1.2.3