Added partialeq trait to Node
This commit is contained in:
parent
95e0ac4499
commit
ec07158633
@ -6,6 +6,7 @@ pub struct List<T: PartialEq> {
|
|||||||
|
|
||||||
type Link<T> = Option<Box<Node<T>>>;
|
type Link<T> = Option<Box<Node<T>>>;
|
||||||
|
|
||||||
|
#[derive(PartialEq)]
|
||||||
struct Node<T> {
|
struct Node<T> {
|
||||||
elem: T,
|
elem: T,
|
||||||
next: Link<T>,
|
next: Link<T>,
|
||||||
|
Loading…
Reference in New Issue
Block a user