From fd82a37c5d093a67314f6aa05bfba959fbfc4a98 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Fri, 28 Oct 2022 14:18:27 +0000 Subject: [PATCH] Make StatusCode::as_str() return a &'static str explicitly --- src/status.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/status.rs b/src/status.rs index d98d24c3..58161c8f 100644 --- a/src/status.rs +++ b/src/status.rs @@ -132,7 +132,7 @@ impl StatusCode { /// assert_eq!(status.as_str(), "200"); /// ``` #[inline] - pub fn as_str(&self) -> &str { + pub fn as_str(&self) -> &'static str { let offset = (self.0.get() - 100) as usize; let offset = offset * 3;