From 80753f8f5c5105a987e958f5b293b50efe98dc89 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 10 Mar 2022 12:53:51 +0100 Subject: [PATCH] Remove unnecessary mut from (Signed)CookieJar examples (#850) --- axum-extra/src/extract/cookie.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/axum-extra/src/extract/cookie.rs b/axum-extra/src/extract/cookie.rs index e16f084f..b638da49 100644 --- a/axum-extra/src/extract/cookie.rs +++ b/axum-extra/src/extract/cookie.rs @@ -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 = 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 SignedCookieJar { /// use axum_extra::extract::cookie::SignedCookieJar; /// use axum::response::IntoResponse; /// - /// async fn handle(mut jar: SignedCookieJar) { + /// async fn handle(jar: SignedCookieJar) { /// let value: Option = jar /// .get("foo") /// .map(|cookie| cookie.value().to_owned()); @@ -321,7 +321,7 @@ impl SignedCookieJar { /// 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 SignedCookieJar { /// 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")) /// } /// ```