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 authored and seanmonstar committed Feb 19, 2024
1 parent 4785cdd commit c03cc8b
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 c03cc8b

Please sign in to comment.