From 6a91756f2cd82b95e9d7fa445e9b740e6a08c842 Mon Sep 17 00:00:00 2001 From: Jayson Reis Date: Wed, 22 Jun 2022 09:56:03 +0200 Subject: [PATCH] fix: Do not needs-hash annotation when it is already supplied --- src/maps.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/maps.rs b/src/maps.rs index 990708e..dfabe8d 100644 --- a/src/maps.rs +++ b/src/maps.rs @@ -50,7 +50,9 @@ pub fn generate_output_map( match annotations { Metadata::String(_) => panic!("{} shoult not be a string at this point", ANNOTATIONS_KEY), Metadata::HashMap(h) => { - h.insert(ANNOTATION_NEEDS_HASH.into(), "true".into()); + if !h.contains_key(ANNOTATION_NEEDS_HASH) { + h.insert(ANNOTATION_NEEDS_HASH.into(), "true".into()); + } } }