Add an AsRef implementation to FuncName so we can read its contents.

This commit is contained in:
Jakob Stoklund Olesen
2017-09-13 09:34:05 -07:00
parent 5845f56cda
commit ef27c3daf0

View File

@@ -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 {