diff --git a/Cargo.lock b/Cargo.lock index 491044cd..7dbbd661 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -316,7 +316,7 @@ dependencies = [ "js-sys", "num-integer", "num-traits", - "time 0.1.45", + "time", "wasm-bindgen", "winapi 0.3.9", ] @@ -394,17 +394,6 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" -[[package]] -name = "cookie" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" -dependencies = [ - "percent-encoding", - "time 0.3.20", - "version_check 0.9.4", -] - [[package]] name = "core-foundation-sys" version = "0.8.3" @@ -2783,7 +2772,6 @@ name = "seed" version = "0.9.2" dependencies = [ "console_error_panic_hook", - "cookie", "dbg", "enclose", "futures", @@ -3174,33 +3162,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "time" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" -dependencies = [ - "itoa", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" - -[[package]] -name = "time-macros" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" -dependencies = [ - "time-core", -] - [[package]] name = "tinystr" version = "0.7.1" diff --git a/Cargo.toml b/Cargo.toml index c06f0bd0..6ae29524 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,6 @@ exclude = [ ] [dependencies] -cookie = { version = "0.16.2", features = ["percent-encode"] } # @TODO: remove once we can use entities without `Debug` in `log!` and `error!` on `stable` Rust. # https://github.com/Centril/rfcs/blob/rfc/quick-debug-macro/text/0000-quick-debug-macro.md#types-which-are-not-debug dbg = "1.0.4" diff --git a/src/browser/util.rs b/src/browser/util.rs index d4626a1e..10ed52b0 100644 --- a/src/browser/util.rs +++ b/src/browser/util.rs @@ -60,25 +60,6 @@ pub fn canvas_context_2d(canvas: &web_sys::HtmlCanvasElement) -> web_sys::Canvas .expect("Problem casting as web_sys::CanvasRenderingContext2d") } -/// Convenience function to get all cookies from the current `HtmlDocument` -/// _Note:_ Returns `None` if parsing cookies fails or there are no cookies. -pub fn cookies() -> Option { - let cookies_str = html_document().cookie().ok()?; - let mut jar = cookie::CookieJar::new(); - - for cookie_str in cookies_str.split(';') { - let cookie = cookie::Cookie::parse_encoded(cookie_str).ok()?; - jar.add(cookie.into_owned()); - } - - let jar_is_empty = jar.iter().next().is_none(); - if jar_is_empty { - None - } else { - Some(jar) - } -} - #[deprecated( since = "0.8.0", note = "use [`Orders::after_next_render`](../../app/orders/trait.Orders.html#method.after_next_render) instead" diff --git a/src/lib.rs b/src/lib.rs index fa503555..798e416e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -97,8 +97,7 @@ pub use crate::{ }, browser::url::Url, browser::util::{ - self, body, canvas, canvas_context_2d, cookies, document, error, history, html_document, - log, window, + self, body, canvas, canvas_context_2d, document, error, history, html_document, log, window, }, virtual_dom::{Attrs, EventHandler, Style}, };