diff --git a/contrib/lib/Cargo.toml b/contrib/lib/Cargo.toml index 56b32de5..a0155394 100644 --- a/contrib/lib/Cargo.toml +++ b/contrib/lib/Cargo.toml @@ -79,7 +79,7 @@ memcache = { version = "0.14", optional = true } r2d2-memcache = { version = "0.5", optional = true } # SpaceHelmet dependencies -time = { version = "0.1.40", optional = true } +time = { version = "0.2.9", optional = true } # Compression dependencies brotli = { version = "3.3", optional = true } diff --git a/contrib/lib/src/helmet/policy.rs b/contrib/lib/src/helmet/policy.rs index efe713a0..df95ddb0 100644 --- a/contrib/lib/src/helmet/policy.rs +++ b/contrib/lib/src/helmet/policy.rs @@ -212,12 +212,12 @@ impl Default for ExpectCt { impl Into> for &ExpectCt { fn into(self) -> Header<'static> { let policy_string = match self { - ExpectCt::Enforce(age) => format!("max-age={}, enforce", age.num_seconds()), + ExpectCt::Enforce(age) => format!("max-age={}, enforce", age.whole_seconds()), ExpectCt::Report(age, uri) => { - format!(r#"max-age={}, report-uri="{}""#, age.num_seconds(), uri) + format!(r#"max-age={}, report-uri="{}""#, age.whole_seconds(), uri) } ExpectCt::ReportAndEnforce(age, uri) => { - format!("max-age={}, enforce, report-uri=\"{}\"", age.num_seconds(), uri) + format!("max-age={}, enforce, report-uri=\"{}\"", age.whole_seconds(), uri) } }; @@ -298,11 +298,11 @@ impl Default for Hsts { impl Into> for &Hsts { fn into(self) -> Header<'static> { let policy_string = match self { - Hsts::Enable(age) => format!("max-age={}", age.num_seconds()), + Hsts::Enable(age) => format!("max-age={}", age.whole_seconds()), Hsts::IncludeSubDomains(age) => { - format!("max-age={}; includeSubDomains", age.num_seconds()) + format!("max-age={}; includeSubDomains", age.whole_seconds()) } - Hsts::Preload(age) => format!("max-age={}; preload", age.num_seconds()), + Hsts::Preload(age) => format!("max-age={}; preload", age.whole_seconds()), }; Header::new(Hsts::NAME, policy_string) diff --git a/contrib/lib/tests/helmet.rs b/contrib/lib/tests/helmet.rs index bd67537b..0ebf4be9 100644 --- a/contrib/lib/tests/helmet.rs +++ b/contrib/lib/tests/helmet.rs @@ -95,13 +95,13 @@ mod helmet_tests { assert_header!( response, "Strict-Transport-Security", - format!("max-age={}", Duration::weeks(52).num_seconds()) + format!("max-age={}", Duration::weeks(52).whole_seconds()) ); assert_header!( response, "Expect-CT", - format!("max-age={}, enforce", Duration::days(30).num_seconds()) + format!("max-age={}, enforce", Duration::days(30).whole_seconds()) ); assert_header!(response, "Referrer-Policy", "no-referrer"); diff --git a/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr index 55203bc4..8c8e9c5b 100644 --- a/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr @@ -111,9 +111,9 @@ error[E0277]: the trait bound `S: rocket::http::uri::Ignorable>() { } +469 | pub fn assert_ignorable>() { } | ------------ required by this bound in `rocket::http::uri::assert_ignorable` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -127,9 +127,9 @@ error[E0277]: the trait bound `usize: rocket::http::uri::Ignorable>() { } +469 | pub fn assert_ignorable>() { } | ------------ required by this bound in `rocket::http::uri::assert_ignorable` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/http/Cargo.toml b/core/http/Cargo.toml index f5e7babb..53b358f4 100644 --- a/core/http/Cargo.toml +++ b/core/http/Cargo.toml @@ -23,7 +23,7 @@ private-cookies = ["cookie/secure"] smallvec = "1.0" percent-encoding = "1" hyper = { version = "0.10.13", default-features = false } -time = "0.2.4" +time = "0.2.9" indexmap = "1.0" rustls = { version = "0.16", optional = true } state = "0.4" diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index f4a16469..3e196eb8 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -31,7 +31,7 @@ log = "0.4" toml = "0.4.7" num_cpus = "1.0" state = "0.4.1" -time = "0.2.4" +time = "0.2.9" memchr = "2" # TODO: Use pear instead. binascii = "0.1" pear = "0.1"