1
0
Fork 0
forked from wry/wry

autocommit 2022-04-28 19:49:51 CEST

This commit is contained in:
Julian Orth 2022-04-28 19:49:51 +02:00
parent bd63f3f5f1
commit 1242a6c1e1
31 changed files with 707 additions and 64 deletions

View file

@ -79,6 +79,15 @@ impl<T> LinkedList<T> {
self.root.append(t)
}
pub fn add_last_existing(&self, t: &NodeRef<T>) {
self.root.prepend_existing(t)
}
#[allow(dead_code)]
pub fn add_first_existing(&self, t: &NodeRef<T>) {
self.root.append_existing(t)
}
pub fn iter(&self) -> LinkedListIter<T> {
unsafe {
let root = self.root.data.as_ref();