Remove unnecessary mut from (Signed)CookieJar examples (#850)

This commit is contained in:
Jonas Platte 2022-03-10 12:53:51 +01:00 committed by GitHub
parent 88974f4299
commit 80753f8f5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,7 +112,7 @@ impl CookieJar {
/// use axum_extra::extract::cookie::CookieJar;
/// use axum::response::IntoResponse;
///
/// async fn handle(mut jar: CookieJar) {
/// async fn handle(jar: CookieJar) {
/// let value: Option<String> = jar
/// .get("foo")
/// .map(|cookie| cookie.value().to_owned());
@ -130,7 +130,7 @@ impl CookieJar {
/// use axum_extra::extract::cookie::{CookieJar, Cookie};
/// use axum::response::IntoResponse;
///
/// async fn handle(mut jar: CookieJar) -> impl IntoResponse {
/// async fn handle(jar: CookieJar) -> impl IntoResponse {
/// jar.remove(Cookie::named("foo"))
/// }
/// ```
@ -150,7 +150,7 @@ impl CookieJar {
/// use axum_extra::extract::cookie::{CookieJar, Cookie};
/// use axum::response::IntoResponse;
///
/// async fn handle(mut jar: CookieJar) -> impl IntoResponse {
/// async fn handle(jar: CookieJar) -> impl IntoResponse {
/// jar.add(Cookie::new("foo", "bar"))
/// }
/// ```
@ -303,7 +303,7 @@ impl<K> SignedCookieJar<K> {
/// use axum_extra::extract::cookie::SignedCookieJar;
/// use axum::response::IntoResponse;
///
/// async fn handle(mut jar: SignedCookieJar) {
/// async fn handle(jar: SignedCookieJar) {
/// let value: Option<String> = jar
/// .get("foo")
/// .map(|cookie| cookie.value().to_owned());
@ -321,7 +321,7 @@ impl<K> SignedCookieJar<K> {
/// use axum_extra::extract::cookie::{SignedCookieJar, Cookie};
/// use axum::response::IntoResponse;
///
/// async fn handle(mut jar: SignedCookieJar) -> impl IntoResponse {
/// async fn handle(jar: SignedCookieJar) -> impl IntoResponse {
/// jar.remove(Cookie::named("foo"))
/// }
/// ```
@ -341,7 +341,7 @@ impl<K> SignedCookieJar<K> {
/// use axum_extra::extract::cookie::{SignedCookieJar, Cookie};
/// use axum::response::IntoResponse;
///
/// async fn handle(mut jar: SignedCookieJar) -> impl IntoResponse {
/// async fn handle(jar: SignedCookieJar) -> impl IntoResponse {
/// jar.add(Cookie::new("foo", "bar"))
/// }
/// ```