diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-02-23 10:59:13 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-02-23 10:59:13 +0100 |
commit | 731902c6c5827ab1acbcbb077555cf818cd6c5f5 (patch) | |
tree | c8fbcc24cdb6400ee0c071aaf569373bfb251bc6 | |
parent | 10613ad4f80f63fc354c9c06f08bca0fc6476eeb (diff) |
Add implementation for PartialEq for TreeElement
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | lib/etc/libimagutil/src/tree.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/etc/libimagutil/src/tree.rs b/lib/etc/libimagutil/src/tree.rs index e3f4dfac..42bdd7cf 100644 --- a/lib/etc/libimagutil/src/tree.rs +++ b/lib/etc/libimagutil/src/tree.rs @@ -69,6 +69,14 @@ struct TreeElement<T> { pub element: T } +impl<T> PartialEq<TreeElement<T>> for TreeElement<T> + where T: PartialEq +{ + fn eq(&self, other: &TreeElement<T>) -> bool { + self.element == other.element + } +} + impl<T> TreeElement<T> { fn new(t: T) -> Self { TreeElement { |