From 12ce43f0770ae13120ffeff9b32a78a044b34594 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 24 Jan 2018 17:37:08 -0800 Subject: [PATCH] feat(uri): Add a PartialEq impl --- src/uri.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/uri.rs b/src/uri.rs index ea2ea8dea3..36c170c8fc 100644 --- a/src/uri.rs +++ b/src/uri.rs @@ -274,6 +274,13 @@ impl PartialEq for Uri { } } +impl PartialEq 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 { fn eq(&self, other: & &'a str) -> bool { self.source.as_str() == *other