mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 05:41:50 +01:00
content_disposition: remove unnecessary allocations
This commit is contained in:
parent
4d69e6d0b4
commit
e414a52b51
@ -193,8 +193,9 @@ impl fmt::Display for ContentDisposition {
|
||||
}
|
||||
}
|
||||
if use_simple_format {
|
||||
use std::str;
|
||||
try!(write!(f, "; filename=\"{}\"",
|
||||
match String::from_utf8(bytes.clone()) {
|
||||
match str::from_utf8(bytes) {
|
||||
Ok(s) => s,
|
||||
Err(_) => return Err(fmt::Error),
|
||||
}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user