allocate new SafeString in FromFormValue impl
thanks to @fdb-hiroshima for this review!
This commit is contained in:
parent
0897088aa5
commit
d62c72dde0
@ -110,8 +110,6 @@ impl<'v> FromFormValue<'v> for SafeString {
|
|||||||
|
|
||||||
fn from_form_value(form_value: &'v RawStr) -> Result<SafeString, &'v RawStr> {
|
fn from_form_value(form_value: &'v RawStr) -> Result<SafeString, &'v RawStr> {
|
||||||
let val = String::from_form_value(form_value)?;
|
let val = String::from_form_value(form_value)?;
|
||||||
Ok(SafeString {
|
Ok(SafeString::new(&val))
|
||||||
value: val,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user