try to implement join

This commit is contained in:
Quentin Legot
2023-04-23 15:11:06 +02:00
parent 1055e6a0ac
commit a211e93905
8 changed files with 79 additions and 31 deletions

View File

@ -9,11 +9,10 @@ use std::ptr;
/// These methods wrap unsafe instructions because it doesn't respect borrow rules per example
/// but everything has been tested with miri to assure there's no Undefined Behaviour (use-after-free, double free, etc.)
/// or memory leak
#[derive(PartialEq)]
#[derive(Clone)]
#[derive(PartialEq, Clone, Debug)]
pub struct List<T: PartialEq> {
head: Link<T>,
tail: *mut Node<T>,
tail: Link<T>,
}
type Link<T> = *mut Node<T>;