aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-01 10:04:28 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-01 10:04:28 -0500
commit0983a0bd3050d02659f7c58555b8cbcfffed2c3b (patch)
treeebcd0ec5b8d2b6770dbf01083df3aaa217645dd2
parent43414738a029a0b98f1937ba31501cf492d58003 (diff)
Shrink diff in one place
-rw-r--r--src/libstore/make-content-addressed.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstore/make-content-addressed.cc b/src/libstore/make-content-addressed.cc
index ff9f5cdaa..42de79226 100644
--- a/src/libstore/make-content-addressed.cc
+++ b/src/libstore/make-content-addressed.cc
@@ -35,10 +35,9 @@ std::map<StorePath, StorePath> makeContentAddressed(
auto i = remappings.find(ref);
auto replacement = i != remappings.end() ? i->second : ref;
// FIXME: warn about unremapped paths?
- if (replacement != ref) {
+ if (replacement != ref)
rewrites.insert_or_assign(srcStore.printStorePath(ref), srcStore.printStorePath(replacement));
- refs.others.insert(std::move(replacement));
- }
+ refs.others.insert(std::move(replacement));
}
}