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 16, 2024
1 parent 9bca94f commit 45a1a5c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/header/value.rs
Original file line number Diff line number Diff line change
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 45a1a5c

Please sign in to comment.