Skip to content

Commit

Permalink
fix: avoid tempering last_updated for individual symbol when file is …
Browse files Browse the repository at this point in the history
…updated
  • Loading branch information
rumblefrog committed Apr 26, 2022
1 parent 4a518b5 commit cb5d931
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chumbucket/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chumbucket"
version = "0.4.1"
version = "0.4.2"
description = "Chums through manifest, include, and index files"
authors = ["rumblefrog <contact@rumblefrog>"]
edition = "2021"
Expand Down
7 changes: 2 additions & 5 deletions chumbucket/src/commands/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,10 @@ impl<'b> ChronicleProcessor<'b> {
new: &HashMap<String, T>,
version: Option<Versioning>,
) -> u64 {
let mut diff = 0;

// Handle any new entries
for (k, v) in new {
if let Entry::Vacant(entry) = existing.entry(k.clone()) {
entry.insert(v.clone());
diff += 1;
}
}

Expand All @@ -332,12 +329,12 @@ impl<'b> ChronicleProcessor<'b> {
}
}

diff += to_remove.len() as u64;

for k in to_remove {
existing.remove(&k);
}

let mut diff = 0;

// At this point, both list should have the same keys, so we can safely iterate over them
// Handle any updated entries
for (k, v) in existing.iter_mut() {
Expand Down

0 comments on commit cb5d931

Please sign in to comment.