mirror of
https://github.com/fafhrd91/actix-net
synced 2025-03-20 16:05:18 +01:00
Add impl IntoPattern for &String
This commit is contained in:
parent
59c5e9be6a
commit
e21c58930b
@ -1,5 +1,9 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.2.3] - 2019-12-25
|
||||||
|
|
||||||
|
* Add impl `IntoPattern` for `&String`
|
||||||
|
|
||||||
## [0.2.2] - 2019-12-25
|
## [0.2.2] - 2019-12-25
|
||||||
|
|
||||||
* Use `IntoPattern` for `RouterBuilder::path()`
|
* Use `IntoPattern` for `RouterBuilder::path()`
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-router"
|
name = "actix-router"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Path router"
|
description = "Path router"
|
||||||
keywords = ["actix"]
|
keywords = ["actix"]
|
||||||
|
@ -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 {
|
impl<'a> IntoPattern for &'a str {
|
||||||
fn is_single(&self) -> bool {
|
fn is_single(&self) -> bool {
|
||||||
true
|
true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user