Skip to content

Commit

Permalink
Make StatusCode::as_str() return a &'static str explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Oct 28, 2022
1 parent 34a9d6b commit fd82a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/status.rs
Expand Up @@ -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;

Expand Down

0 comments on commit fd82a37

Please sign in to comment.