mirror of
https://github.com/actix/actix-web.git
synced 2025-01-02 21:38:46 +00:00
content_disposition: remove unnecessary allocations
This commit is contained in:
parent
4d69e6d0b4
commit
e414a52b51
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue