diff --git a/router/src/router.rs b/router/src/router.rs index 0faa27be..bffc208f 100644 --- a/router/src/router.rs +++ b/router/src/router.rs @@ -19,26 +19,26 @@ impl Router { } } - pub fn recognize(&self, reosurce: &mut R) -> Option<(&T, ResourceId)> + pub fn recognize(&self, resource: &mut R) -> Option<(&T, ResourceId)> where R: Resource

, P: ResourcePath, { for item in self.0.iter() { - if item.0.match_path(reosurce.resource_path()) { + if item.0.match_path(resource.resource_path()) { return Some((&item.1, ResourceId(item.0.id()))); } } None } - pub fn recognize_mut(&mut self, reosurce: &mut R) -> Option<(&mut T, ResourceId)> + pub fn recognize_mut(&mut self, resource: &mut R) -> Option<(&mut T, ResourceId)> where R: Resource

, P: ResourcePath, { for item in self.0.iter_mut() { - if item.0.match_path(reosurce.resource_path()) { + if item.0.match_path(resource.resource_path()) { return Some((&mut item.1, ResourceId(item.0.id()))); } }