Skip to content

Commit

Permalink
Drop PartialEq impl for Regex (fixes rust-lang#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed Apr 23, 2016
1 parent 4332c9c commit af48d0d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/re_unicode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,6 @@ impl From<Exec> for Regex {
}
}

/// Equality comparison is based on the original string. It is possible that
/// different regular expressions have the same matching behavior, but are
/// still compared unequal. For example, `\d+` and `\d\d*` match the same set
/// of strings, but are not considered equal.
impl PartialEq for Regex {
fn eq(&self, other: &Regex) -> bool {
self.as_str() == other.as_str()
}
}

impl Eq for Regex {}

impl FromStr for Regex {
type Err = Error;

Expand Down

0 comments on commit af48d0d

Please sign in to comment.