Skip to content

Commit

Permalink
Merge pull request #53 from Turbo87/fix-ci
Browse files Browse the repository at this point in the history
Fix broken CI builds
  • Loading branch information
yoshuawuyts authored Oct 25, 2021
2 parents 24ee5f9 + d892b7d commit 953e791
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl Index<&str> for Params {
type Output = String;
fn index(&self, index: &str) -> &String {
match self.map.get(index) {
None => panic!(format!("params[{}] did not exist", index)),
None => panic!("params[{}] did not exist", index),
Some(s) => s,
}
}
Expand Down Expand Up @@ -554,21 +554,4 @@ mod tests {
let m = router.recognize("/4.static.static");
assert!(m.is_err());
}

#[test]
fn test_string_encoding() {
let mut router = Router::new();
router.add("/foo%2Fbar", "Hello".to_string());
router.add("/foo bar", "Hello".to_string());

// assert_eq!(
// router.recognize("/foo%2fbar").unwrap().handler().as_str(),
// "Hello"
// );

assert_eq!(
router.recognize("/foo%20bar").unwrap().handler().as_str(),
"Hello"
);
}
}

0 comments on commit 953e791

Please sign in to comment.