diff --git a/actix-router/src/path.rs b/actix-router/src/path.rs index e9cdee1f..6e4e2fdf 100644 --- a/actix-router/src/path.rs +++ b/actix-router/src/path.rs @@ -118,8 +118,8 @@ impl Path { name: impl Into>, value: impl Into>, ) { - let value: Cow<'static, str> = value.into(); - self.segments.push((name.into(), PathItem::Static(value))); + self.segments + .push((name.into(), PathItem::Static(value.into()))); } /// Check if there are any matched patterns