Upgrade cookie dependency to 0.18

… and replace uses of the deprecated Cookie::named fn.
This commit is contained in:
Davide Ferrero 2023-11-24 12:40:12 +01:00 committed by GitHub
parent 92253fe7b3
commit fd7fd9fa71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -52,7 +52,7 @@ tower-service = "0.3"
# optional dependencies
axum-macros = { path = "../axum-macros", version = "0.3.7", optional = true }
cookie = { package = "cookie", version = "0.17", features = ["percent-encode"], optional = true }
cookie = { package = "cookie", version = "0.18.0", features = ["percent-encode"], optional = true }
form_urlencoded = { version = "1.1.0", optional = true }
headers = { version = "0.3.8", optional = true }
multer = { version = "2.0.0", optional = true }

View file

@ -168,7 +168,7 @@ impl CookieJar {
/// use axum::response::IntoResponse;
///
/// async fn handle(jar: CookieJar) -> CookieJar {
/// jar.remove(Cookie::named("foo"))
/// jar.remove(Cookie::from("foo"))
/// }
/// ```
#[must_use]
@ -250,7 +250,7 @@ mod tests {
}
async fn remove_cookie(jar: $jar) -> impl IntoResponse {
jar.remove(Cookie::named("key"))
jar.remove(Cookie::from("key"))
}
let state = AppState {

View file

@ -216,7 +216,7 @@ impl<K> PrivateCookieJar<K> {
/// use axum::response::IntoResponse;
///
/// async fn handle(jar: PrivateCookieJar) -> PrivateCookieJar {
/// jar.remove(Cookie::named("foo"))
/// jar.remove(Cookie::from("foo"))
/// }
/// ```
#[must_use]

View file

@ -234,7 +234,7 @@ impl<K> SignedCookieJar<K> {
/// use axum::response::IntoResponse;
///
/// async fn handle(jar: SignedCookieJar) -> SignedCookieJar {
/// jar.remove(Cookie::named("foo"))
/// jar.remove(Cookie::from("foo"))
/// }
/// ```
#[must_use]