mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 22:49:21 +02:00
@ -127,9 +127,8 @@ impl Display for EntityTag {
|
||||
impl FromStr for EntityTag {
|
||||
type Err = crate::error::ParseError;
|
||||
|
||||
fn from_str(s: &str) -> Result<EntityTag, crate::error::ParseError> {
|
||||
let length: usize = s.len();
|
||||
let slice = &s[..];
|
||||
fn from_str(slice: &str) -> Result<EntityTag, crate::error::ParseError> {
|
||||
let length = slice.len();
|
||||
// Early exits if it doesn't terminate in a DQUOTE.
|
||||
if !slice.ends_with('"') || slice.len() < 2 {
|
||||
return Err(crate::error::ParseError::Header);
|
||||
|
@ -88,9 +88,9 @@ pub fn parse_extended_value(
|
||||
};
|
||||
|
||||
Ok(ExtendedValue {
|
||||
value,
|
||||
charset,
|
||||
language_tag,
|
||||
value,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user