Added partialeq trait to Node

This commit is contained in:
François Autin 2023-03-08 15:49:31 +01:00
parent 95e0ac4499
commit ec07158633
No known key found for this signature in database
GPG Key ID: 343F5D382E1DD77C

View File

@ -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>,