aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-12-26 16:05:34 +0100
committerHarald Eilertsen <haraldei@anduin.net>2018-12-26 22:34:32 +0100
commit3797d492897b9210ba5071dbd2af99badaf5e3b9 (patch)
treeba2d0807a42e399ffca499a846f7901745145061 /src
parent81acfc65ededd306a8c2b46d483caee8244c52ca (diff)
downloadprimstav-3797d492897b9210ba5071dbd2af99badaf5e3b9.tar.gz
primstav-3797d492897b9210ba5071dbd2af99badaf5e3b9.tar.bz2
primstav-3797d492897b9210ba5071dbd2af99badaf5e3b9.zip
Print links to sources for the marks.
Diffstat (limited to 'src')
-rw-r--r--src/main.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index f6ea539..2287575 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -42,7 +42,6 @@ fn test_capitalize() {
assert_eq!("", capitalize(""));
}
-#[allow(dead_code)]
#[derive(Deserialize)]
struct Mark {
name: String,
@@ -68,6 +67,15 @@ fn print_entry(m: &Mark) {
if !m.symbols.is_empty() {
println!("Symboler: {}", m.symbols.join(", "));
}
+
+ if !m.links.is_empty() {
+ println!("Kilder:");
+ for l in &m.links {
+ for (source, url) in l.iter() {
+ println!(" {}: {}", source, url);
+ }
+ }
+ }
}
fn main() {