mirror of https://github.com/fafhrd91/actix-web
Make web::Path innards public
So we can do something like this: ``` async fn delete_channel_message( web::Path((channel_id, message_id)): web::Path<(Snowflake, Snowflake)>, ) { // here channel_id and message_id are Snowflakes, // and not web::Path<Snowflake> } ``` Dunno why other web types are public and this is not.
This commit is contained in:
parent
e0918fb179
commit
8a3a1f2eec
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Make contents of `web::Path` public.
|
||||||
|
|
||||||
## 4.9.0
|
## 4.9.0
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -54,7 +54,7 @@ use crate::{
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Deref, DerefMut, AsRef, Display, From)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Deref, DerefMut, AsRef, Display, From)]
|
||||||
pub struct Path<T>(T);
|
pub struct Path<T>(pub T);
|
||||||
|
|
||||||
impl<T> Path<T> {
|
impl<T> Path<T> {
|
||||||
/// Unwrap into inner `T` value.
|
/// Unwrap into inner `T` value.
|
||||||
|
|
Loading…
Reference in New Issue