Add proper 'cfg' to 'get_private_pending()'.

This commit is contained in:
Sergio Benitez 2020-10-15 00:46:30 -07:00
parent 5cf249581f
commit 5615767ca6
1 changed files with 2 additions and 0 deletions

View File

@ -295,6 +295,8 @@ impl<'a> CookieJar<'a> {
/// let pending_cookie = jar.get_private_pending("name");
/// }
/// ```
#[cfg(feature = "private-cookies")]
#[cfg_attr(nightly, doc(cfg(feature = "secrets")))]
pub fn get_private_pending(&self, name: &str) -> Option<Cookie<'static>> {
let cookie = self.get_pending(name)?;
self.jar.private(&*self.key).decrypt(cookie)