We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7a68eb1 + 8e2f882 commit f1a99ffCopy full SHA for f1a99ff
src/category.rs
@@ -25,7 +25,7 @@ impl Category {
25
}
26
27
impl<'r> FromParam<'r> for Category {
28
- type Error = &'r RawStr;
+ type Error = String;
29
30
fn from_param(param: &'r RawStr) -> Result<Self, Self::Error> {
31
let res = param.url_decode();
@@ -34,10 +34,10 @@ impl<'r> FromParam<'r> for Category {
34
if is_category(&url) {
35
Ok(Category { name: url })
36
} else {
37
- Err(RawStr::from_str("no such category"))
+ Err(format!("No category called <{}>", url))
38
39
40
- Err(e) => Err(RawStr::from_str("url illegal in utf-8")),
+ Err(e) => Err(format!("URL illegal in utf-8 ({})", e)),
41
42
43
0 commit comments