From ef27c3daf0d2077e9ce664f32ea9b974e3dab969 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Wed, 13 Sep 2017 09:34:05 -0700 Subject: [PATCH] Add an AsRef implementation to FuncName so we can read its contents. --- lib/cretonne/src/ir/funcname.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/cretonne/src/ir/funcname.rs b/lib/cretonne/src/ir/funcname.rs index 2081f519e5..142a846c22 100644 --- a/lib/cretonne/src/ir/funcname.rs +++ b/lib/cretonne/src/ir/funcname.rs @@ -82,6 +82,12 @@ impl AsRef<[u8]> for NameRepr { } } +impl AsRef<[u8]> for FunctionName { + fn as_ref(&self) -> &[u8] { + self.0.as_ref() + } +} + impl Default for NameRepr { fn default() -> Self { NameRepr::Short {