File tree 1 file changed +23
-0
lines changed 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ use dvec::DVec;
9
9
use from_str:: FromStr ;
10
10
use result:: { Err , Ok } ;
11
11
use to_str:: ToStr ;
12
+ use to_bytes:: IterBytes ;
12
13
13
14
export Url , Query ;
14
15
export from_str, to_str;
@@ -718,6 +719,28 @@ impl Url: to_str::ToStr {
718
719
}
719
720
}
720
721
722
+ impl Url : Eq {
723
+ pure fn eq( &&other : Url ) -> bool {
724
+ self . scheme == other. scheme
725
+ && self . user == other. user
726
+ && self . host == other. host
727
+ && self . port == other. port
728
+ && self . path == other. path
729
+ && self . query == other. query
730
+ && self . fragment == other. fragment
731
+ }
732
+
733
+ pure fn ne( & & other: Url ) -> bool {
734
+ !self . eq ( other)
735
+ }
736
+ }
737
+
738
+ impl Url : IterBytes {
739
+ fn iter_bytes( lsb0: bool, f: to_bytes:: Cb ) {
740
+ self . to_str ( ) . iter_bytes ( lsb0, f)
741
+ }
742
+ }
743
+
721
744
#[ cfg ( test) ]
722
745
mod tests {
723
746
#[ test]
You can’t perform that action at this time.
0 commit comments