From 7a6232471f63320e1ed7647e407e6b3aa9f6d075 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Fri, 5 Jan 2024 08:58:13 -0700 Subject: [PATCH] const-oid: impl `AsRef` for `ObjectIdentifier` `AsRef` is a convenient trait because it's in the prelude --- const-oid/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/const-oid/src/lib.rs b/const-oid/src/lib.rs index 938ecc94e..9d137026d 100644 --- a/const-oid/src/lib.rs +++ b/const-oid/src/lib.rs @@ -191,6 +191,12 @@ impl AsRef<[u8]> for ObjectIdentifier { } } +impl AsRef for ObjectIdentifier { + fn as_ref(&self) -> &ObjectIdentifierRef { + self.as_oid_ref() + } +} + impl Borrow for ObjectIdentifier { fn borrow(&self) -> &ObjectIdentifierRef { self.as_oid_ref()