feat(uri): Add a PartialEq<str> impl for Uri
This commit is contained in:
committed by
Sean McArthur
parent
5c170e8ccd
commit
11b49c2cc8
@@ -274,6 +274,13 @@ impl PartialEq for Uri {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl PartialEq<str> for Uri {
|
||||||
|
fn eq(&self, other: &str) -> bool {
|
||||||
|
self.source.as_str() == other
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME delete for 0.12
|
||||||
impl<'a> PartialEq<&'a str> for Uri {
|
impl<'a> PartialEq<&'a str> for Uri {
|
||||||
fn eq(&self, other: & &'a str) -> bool {
|
fn eq(&self, other: & &'a str) -> bool {
|
||||||
self.source.as_str() == *other
|
self.source.as_str() == *other
|
||||||
|
|||||||
Reference in New Issue
Block a user