aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/main.rs b/src/main.rs
index c56ffb3..fa18e1d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -15,9 +15,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use chrono;
-use serde_derive::Deserialize;
use serde_yaml;
-use std::collections::BTreeMap;
use std::io::BufReader;
use std::iter::Iterator;
use std::fs::File;
@@ -25,6 +23,8 @@ use std::string::ToString;
mod locale;
+use primstav::{Primstav, Mark};
+
fn capitalize(s: &str) -> String {
let mut chars = s.chars();
match chars.next() {
@@ -42,18 +42,6 @@ fn test_capitalize() {
assert_eq!("", capitalize(""));
}
-#[derive(Deserialize)]
-struct Mark {
- name: String,
- alternative_names: Vec<String>,
- symbols: Vec<String>,
- links: BTreeMap<String, String>,
-}
-
-struct Primstav {
- marks: BTreeMap<String, Mark>,
-}
-
fn print_entry(m: &Mark) {
println!("{}", capitalize(&m.name));