4 lines
153 B
Rust
4 lines
153 B
Rust
|
pub fn form_decode<E: std::error::Error>(input: &str, err: E) -> Result<String, E> {
|
||
|
Ok(urlencoding::decode(input).map_err(|_| err)?.into_owned())
|
||
|
}
|