mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-26 00:56:27 +01:00
Remove unnecessary mut from (Signed)CookieJar examples (#850)
This commit is contained in:
parent
88974f4299
commit
80753f8f5c
1 changed files with 6 additions and 6 deletions
|
@ -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"))
|
||||
/// }
|
||||
/// ```
|
||||
|
|
Loading…
Reference in a new issue