summaryrefslogtreecommitdiff
path: root/dhall/src/syntax
diff options
context:
space:
mode:
authorNadrieril2020-04-10 12:22:44 +0100
committerGitHub2020-04-10 12:22:44 +0100
commitf78da0fb1f338123a226ec4d576b5329fffb5148 (patch)
tree627fa7b0b2b951efc4102d02e0a8f5a05e4aa03e /dhall/src/syntax
parentda80ef06a91e3869cc3c1d4dbd07259c408ff490 (diff)
parentefe4b340bebaa7ef8bce6e69194959b126c5fade (diff)
Merge pull request #160 from Nadrieril/toMap
Deserialize `Prelude.Map` and `toMap` to a map instead of a list
Diffstat (limited to '')
-rw-r--r--dhall/src/syntax/ast/label.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/dhall/src/syntax/ast/label.rs b/dhall/src/syntax/ast/label.rs
index 43c3f53..2abde80 100644
--- a/dhall/src/syntax/ast/label.rs
+++ b/dhall/src/syntax/ast/label.rs
@@ -24,6 +24,12 @@ impl From<&Label> for String {
}
}
+impl std::borrow::Borrow<str> for Label {
+ fn borrow(&self) -> &str {
+ self.0.as_ref()
+ }
+}
+
impl Label {
pub fn from_str(s: &str) -> Label {
Label(s.into())