diff options
author | Wesley Moore <wes@wezm.net> | 2019-07-08 11:34:28 +1000 |
---|---|---|
committer | Wesley Moore <wes@wezm.net> | 2019-07-08 11:34:28 +1000 |
commit | 034d15a1a135bda84f45c768a1786f1548fe5156 (patch) | |
tree | a90d418ffdeb93afd4a7181ee35f3edca92b9dbd | |
parent | 44888630b7ee1dbefa9964ca750b1622b3dc5fb0 (diff) |
Annotation values are Vecs
-rw-r--r-- | src/bin/annotaterust.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/annotaterust.rs b/src/bin/annotaterust.rs index 46154fe..8a85563 100644 --- a/src/bin/annotaterust.rs +++ b/src/bin/annotaterust.rs @@ -30,12 +30,12 @@ fn main() { let blobs = git::parse_ls_tree_output(&output).expect("parse"); let mut annotations = HashMap::new(); - annotations.insert(blobs[0].object, Annotation::Markdown { + annotations.entry(blobs[0].object).or_insert(Vec::new()).push(Annotation::Markdown { lineno: 1, title: "Title".to_string(), content: "content".to_string() }); - annotations.insert(blobs[1].object, Annotation::Link { + annotations.entry(blobs[0].object).or_insert(Vec::new()).push(Annotation::Link { lineno: 1, colno: 0, len: 5, |