From c909431b2521f2c4e0af3fdc678c12560b360447 Mon Sep 17 00:00:00 2001 From: mxsm Date: Fri, 15 Nov 2024 09:38:36 +0000 Subject: [PATCH] =?UTF-8?q?[ISSUE=20#53]=F0=9F=8D=BBimpl=20AsRef=20for=20CheetahString?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cheetah_string.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cheetah_string.rs b/src/cheetah_string.rs index c440f8e..ea26571 100644 --- a/src/cheetah_string.rs +++ b/src/cheetah_string.rs @@ -195,6 +195,12 @@ impl AsRef<[u8]> for CheetahString { } } +impl AsRef for CheetahString { + fn as_ref(&self) -> &CheetahString { + self + } +} + impl From<&String> for CheetahString { fn from(s: &String) -> Self { CheetahString::from_slice(s)