Created
November 4, 2016 13:48
-
-
Save jdm/479a6acbec8608b6d08d5bc2e432ca9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rust-url diff: | |
diff --git a/Cargo.toml b/Cargo.toml | |
index b4fb880..fd147f3 100644 | |
--- a/Cargo.toml | |
+++ b/Cargo.toml | |
@@ -1,7 +1,7 @@ | |
[package] | |
name = "url" | |
-version = "1.2.3" | |
+version = "1.2.0" | |
authors = ["The rust-url developers"] | |
description = "URL library for Rust, based on the WHATWG URL Standard" | |
diff --git a/src/origin.rs b/src/origin.rs | |
index 2217c94..141c20c 100644 | |
--- a/src/origin.rs | |
+++ b/src/origin.rs | |
@@ -10,6 +10,7 @@ | |
use host::Host; | |
use idna::domain_to_unicode; | |
use parser::default_port; | |
+use std::hash::Hash; | |
use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; | |
use Url; | |
@@ -34,7 +35,7 @@ pub fn url_origin(url: &Url) -> Origin { | |
} | |
/// The origin of an URL | |
-#[derive(PartialEq, Eq, Clone, Debug)] | |
+#[derive(PartialEq, Eq, Clone, Debug, Hash)] | |
pub enum Origin { | |
/// A globally unique identifier | |
Opaque(OpaqueOrigin), | |
@@ -107,7 +108,7 @@ impl Origin { | |
} | |
/// Opaque identifier for URLs that have file or other schemes | |
-#[derive(Eq, PartialEq, Clone, Debug)] | |
+#[derive(Eq, PartialEq, Clone, Debug, Hash)] | |
pub struct OpaqueOrigin(usize); | |
#[cfg(feature = "heapsize")] | |
servo diff: | |
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml | |
index 7d98cae..5c33fbc 100644 | |
--- a/components/script/Cargo.toml | |
+++ b/components/script/Cargo.toml | |
@@ -80,3 +80,6 @@ xml5ever = {version = "0.1.2", features = ["unstable"]} | |
git = "https://github.com/servo/webrender" | |
default_features = false | |
features = ["nightly", "serde_derive"] | |
+ | |
+[replace] | |
+"url:1.2.0" = { path = "/Users/jdm/src/rust-url" } | |
diff --git a/components/script/origin.rs b/components/script/origin.rs | |
index 2120498..d06380f 100644 | |
--- a/components/script/origin.rs | |
+++ b/components/script/origin.rs | |
@@ -7,7 +7,7 @@ use url::{Host, Url}; | |
use url::Origin as UrlOrigin; | |
/// A representation of an [origin](https://html.spec.whatwg.org/multipage/#origin-2). | |
-#[derive(HeapSizeOf, JSTraceable)] | |
+#[derive(HeapSizeOf, JSTraceable, Hash)] | |
pub struct Origin { | |
#[ignore_heap_size_of = "Arc<T> has unclear ownership semantics"] | |
inner: Arc<UrlOrigin>, | |
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock | |
index a851a6a..faea5aa 100644 | |
--- a/components/servo/Cargo.lock | |
+++ b/components/servo/Cargo.lock | |
@@ -1015,7 +1015,6 @@ dependencies = [ | |
[[package]] | |
name = "idna" | |
version = "0.1.0" | |
-source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
@@ -2487,17 +2486,22 @@ dependencies = [ | |
[[package]] | |
name = "url" | |
version = "1.2.0" | |
-source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", | |
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", | |
- "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
+ "idna 0.1.0", | |
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"serde 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
+name = "url" | |
+version = "1.2.0" | |
+source = "registry+https://github.com/rust-lang/crates.io-index" | |
+replace = "url 1.2.0" | |
+ | |
+[[package]] | |
name = "user32-sys" | |
version = "0.2.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
@@ -2870,7 +2874,6 @@ dependencies = [ | |
"checksum httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46534074dbb80b070d60a5cb8ecadd8963a00a438ae1a95268850a7ef73b67ae" | |
"checksum hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "eb27e8a3e8f17ac43ffa41bbda9cf5ad3f9f13ef66fa4873409d4902310275f7" | |
"checksum hyper_serde 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "572d2168173019de312a050a24f2ad33ac2ac7895a2139fbf21ee6b6f470a24e" | |
-"checksum idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1053236e00ce4f668aeca4a769a09b3bf5a682d802abd6f3cb39374f6b162c11" | |
"checksum image 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "559d5ebbe9ec73111799e49c07717944b244f8accf5de33a8a8128bc3ecd2e00" | |
"checksum immeta 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3e76ecb1d64979a91c7fc5b7c0495ef1467e3cbff759044f2b88878a5a845ef7" | |
"checksum inflate 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7e0062d2dc2f17d2f13750d95316ae8a2ff909af0fda957084f5defd87c43bb" | |
diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml | |
index 1ae8de5..5043576 100644 | |
--- a/components/servo/Cargo.toml | |
+++ b/components/servo/Cargo.toml | |
@@ -96,3 +96,6 @@ android_glue = "0.2" | |
[target.'cfg(not(target_os = "windows"))'.dependencies] | |
gaol = {git = "https://github.com/servo/gaol"} | |
+ | |
+[replace] | |
+"url:1.2.0" = { path = "/Users/jdm/src/rust-url" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment