allocate new SafeString in FromFormValue impl

thanks to @fdb-hiroshima for this review!
This commit is contained in:
Igor Galić 2018-09-14 19:50:59 +02:00
parent 0897088aa5
commit d62c72dde0
No known key found for this signature in database
GPG Key ID: ACFEFF7F6A123A86
1 changed files with 1 additions and 3 deletions

View File

@ -110,8 +110,6 @@ impl<'v> FromFormValue<'v> for SafeString {
fn from_form_value(form_value: &'v RawStr) -> Result<SafeString, &'v RawStr> {
let val = String::from_form_value(form_value)?;
Ok(SafeString {
value: val,
})
Ok(SafeString::new(&val))
}
}