update changelog

This commit is contained in:
Rob Ede 2022-01-19 19:57:52 +00:00
parent 6098aa6d59
commit 892ee563b3
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,10 @@
# Changes # Changes
## Unreleased - 2021-xx-xx ## Unreleased - 2021-xx-xx
- Add `Path::as_str`. [#2590]
- Deprecate `Path::path`. [#2590]
[#2590]: https://github.com/actix/actix-web/pull/2590
## 0.5.0-rc.1 - 2022-01-14 ## 0.5.0-rc.1 - 2022-01-14

View File

@ -50,16 +50,15 @@ impl<T: ResourcePath> Path<T> {
} }
/// Returns full path as a string. /// Returns full path as a string.
/// #[inline]
/// Use this instead of `
pub fn as_str(&self) -> &str { pub fn as_str(&self) -> &str {
profile_method!(as_str);
self.path.path() self.path.path()
} }
/// Returns unprocessed part of the path. /// Returns unprocessed part of the path.
/// ///
/// # Panics /// Returns empty string if no more is to be processed.
/// Unlike [`path`](Self::path), this will panic if `skip` indexes further than the path length.
#[inline] #[inline]
pub fn unprocessed(&self) -> &str { pub fn unprocessed(&self) -> &str {
profile_method!(unprocessed); profile_method!(unprocessed);