Added partialeq trait to Node
This commit is contained in:
parent
5e265ab27b
commit
f4edac230e
@ -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