diff options
-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, |