diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-07-26 18:13:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 16:13:39 +0000 |
commit | b6f1e3b22d076a9b52691bf641fe4ba55df4470f (patch) | |
tree | c6c8bb8926090dae0ccbfa81a28747abc01af867 /components/hyper_serde/tests | |
parent | 8f377a0cb144b32182938f2210360a9a124e2b16 (diff) | |
download | servo-b6f1e3b22d076a9b52691bf641fe4ba55df4470f.tar.gz servo-b6f1e3b22d076a9b52691bf641fe4ba55df4470f.zip |
dependencies: Upgrade `cookie` and rename Servo's `Cookie` to `ServoCookie` (#32861)
This changes updates to the new version of the `cookie` crate in Servo
which no longer uses the old `time@0.1` data types. This requires using
a new version of `time` while we transition off of the old one. This is
the first step in that process.
In addition, the overloading of the `cookie::Cookie` name was causing a
great deal of confusion, so I've renamed the Servo wrapper to
`ServoCookie` like we do with `ServoUrl`.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/hyper_serde/tests')
-rw-r--r-- | components/hyper_serde/tests/tokens.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/hyper_serde/tests/tokens.rs b/components/hyper_serde/tests/tokens.rs index d7ad09f4e9c..3192f1043ff 100644 --- a/components/hyper_serde/tests/tokens.rs +++ b/components/hyper_serde/tests/tokens.rs @@ -8,14 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use cookie::Cookie; +use cookie::{Cookie, CookieBuilder}; use headers::ContentType; use http::header::{self, HeaderMap, HeaderValue}; use http::StatusCode; use hyper::{Method, Uri}; use hyper_serde::{De, Ser}; use serde_test::{assert_de_tokens, assert_ser_tokens, Token}; -use time::Duration; +use time_03::Duration; #[test] fn test_content_type() { @@ -31,13 +31,13 @@ fn test_cookie() { // Unfortunately we have to do the to_string().parse() dance here to avoid the object being a // string with a bunch of indices in it which apparently is different from the exact same // cookie but parsed as a bunch of strings. - let cookie: Cookie = Cookie::build("Hello", "World!") + let cookie: Cookie = CookieBuilder::new("Hello", "World!") .max_age(Duration::seconds(42)) .domain("servo.org") .path("/") .secure(true) .http_only(false) - .finish() + .build() .to_string() .parse() .unwrap(); |