Skip to content

Commit

Permalink
chore(header): allow clippy::should_implement_trait rule for HeaderVa…
Browse files Browse the repository at this point in the history
…lue::from_str
  • Loading branch information
tottoto committed Feb 19, 2024
1 parent f3b9356 commit 960d5dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/header/value.rs
Expand Up @@ -129,6 +129,7 @@ impl HeaderValue {
/// assert!(val.is_err());
/// ```
#[inline]
#[allow(clippy::should_implement_trait)]
pub fn from_str(src: &str) -> Result<HeaderValue, InvalidHeaderValue> {
HeaderValue::try_from_generic(src, |s| Bytes::copy_from_slice(s.as_bytes()))
}
Expand Down

0 comments on commit 960d5dc

Please sign in to comment.