Skip to content

Commit bba8e71

Browse files
author
Brian J. Burg
committed
---
yaml --- r: 30448 b: refs/heads/incoming c: 10a7865 h: refs/heads/master v: v3
1 parent 51acd32 commit bba8e71

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: a07ea73bdbc023f80efe809388ed9299ba76bcb8
9+
refs/heads/incoming: 10a7865428c03613fa510951f22e00a024a472f6
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libstd/net_url.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use dvec::DVec;
99
use from_str::FromStr;
1010
use result::{Err, Ok};
1111
use to_str::ToStr;
12+
use to_bytes::IterBytes;
1213

1314
export Url, Query;
1415
export from_str, to_str;
@@ -718,6 +719,28 @@ impl Url: to_str::ToStr {
718719
}
719720
}
720721

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+
721744
#[cfg(test)]
722745
mod tests {
723746
#[test]

0 commit comments

Comments
 (0)