1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-28 20:10:35 +02:00

Add impl IntoPattern for &String

This commit is contained in:
Nikolay Kim
2019-12-25 21:34:14 +04:00
parent 59c5e9be6a
commit e21c58930b
3 changed files with 15 additions and 1 deletions

View File

@ -53,6 +53,16 @@ impl IntoPattern for String {
}
}
impl<'a> IntoPattern for &'a String {
fn is_single(&self) -> bool {
true
}
fn patterns(&self) -> Vec<String> {
vec![self.as_str().to_string()]
}
}
impl<'a> IntoPattern for &'a str {
fn is_single(&self) -> bool {
true