Added partialeq trait to Node

This commit is contained in:
François Autin 2023-03-08 15:49:31 +01:00
parent 5e265ab27b
commit f4edac230e
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>>>;
#[derive(PartialEq)]
struct Node<T> {
elem: T,
next: Link<T>,