summaryrefslogtreecommitdiff
path: root/dhall_core
diff options
context:
space:
mode:
authorNadrieril2019-04-18 22:20:40 +0200
committerNadrieril2019-04-18 23:24:58 +0200
commit0682a84eadc383e1d5747576298c9160737e0e99 (patch)
treecdc1dabca561c77fc7cf1ad8975eef8ee71c5166 /dhall_core
parent486a26eb7cea0c99818fde2c3fd933f7aca40b52 (diff)
Label is redundant in EnvItem::Skip
Diffstat (limited to 'dhall_core')
-rw-r--r--dhall_core/src/context.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/dhall_core/src/context.rs b/dhall_core/src/context.rs
index 91eec69..55bfff5 100644
--- a/dhall_core/src/context.rs
+++ b/dhall_core/src/context.rs
@@ -41,11 +41,13 @@ impl<K: Hash + Eq + Clone, T> Context<K, T> {
})
}
- pub fn map<U, F: Fn(&T) -> U>(&self, f: F) -> Context<K, U> {
+ pub fn map<U, F: Fn(&K, &T) -> U>(&self, f: F) -> Context<K, U> {
Context(
self.0
.iter()
- .map(|(k, v)| ((*k).clone(), v.iter().map(&f).collect()))
+ .map(|(k, vs)| {
+ ((*k).clone(), vs.iter().map(|v| f(k, v)).collect())
+ })
.collect(),
)
}