From 4326abb729869d8361cc8e2afc24b25ffc026ab0 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 19 Jan 2022 23:10:59 +0000 Subject: [PATCH] fix doc test --- Cargo.toml | 4 ++++ src/response/builder.rs | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6c64a9e87..ce7eaeb61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -157,6 +157,10 @@ awc = { path = "awc" } name = "test_server" required-features = ["compress-brotli", "compress-gzip", "compress-zstd", "cookies"] +[[test]] +name = "compression" +required-features = ["compress-brotli", "compress-gzip", "compress-zstd"] + [[example]] name = "basic" required-features = ["compress-gzip"] diff --git a/src/response/builder.rs b/src/response/builder.rs index c9b2e6ec6..f50aad9f4 100644 --- a/src/response/builder.rs +++ b/src/response/builder.rs @@ -242,9 +242,10 @@ impl HttpResponseBuilder { /// use actix_web::{HttpResponse, cookie::Cookie}; /// /// // the name, domain and path match the cookie created in the previous example - /// let mut cookie = Cookie::new("name", "value-does-not-matter"); + /// let mut cookie = Cookie::build("name", "value-does-not-matter") /// .domain("www.rust-lang.org") - /// .path("/"); + /// .path("/") + /// .finish(); /// cookie.make_removal(); /// /// let res = HttpResponse::Ok()