let email = login_form.remove("email").unwrap_or_else(|| "".into());
can't be used without remove(), i.e. a getter that provides the value as a value, not as a reference.
I think that another way to improve this would be that the return type of request.form() would have &strs instead of Strings, possibly even in a zero-copy way. The user could then clone() if they wanted or needed to.
Patterns like this
can't be used without
remove()
, i.e. a getter that provides the value as a value, not as a reference.I think that another way to improve this would be that the return type of
request.form()
would have&str
s instead ofString
s, possibly even in a zero-copy way. The user could thenclone()
if they wanted or needed to.