Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ealmloff committed Sep 4, 2023
1 parent 1d1651b commit b135cc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/router/src/routable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ where
type Err = <T as FromStr>::Err;

fn from_route_segment(route: &str) -> Result<Self, Self::Err> {
match urlencoding::decode(&route) {
Ok(segment) => T::from_str(&*segment),
match urlencoding::decode(route) {
Ok(segment) => T::from_str(&segment),
Err(err) => {
log::error!("Failed to decode url encoding: {}", err);
T::from_str(route)
Expand All @@ -67,7 +67,7 @@ where
#[test]
fn full_circle() {
let route = "testing 1234 hello world";
assert_eq!(String::from_route_segment(&route).unwrap(), route);
assert_eq!(String::from_route_segment(route).unwrap(), route);
}

/// Something that can be converted to route segments
Expand Down

0 comments on commit b135cc0

Please sign in to comment.