summaryrefslogtreecommitdiff
path: root/dhall/src/syntax/ast
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/syntax/ast')
-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())