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
## 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

View File

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