Implement clone for the context.

This commit is contained in:
Tom Alexander
2022-12-03 21:35:30 -05:00
parent b91e4df797
commit dff528da32
5 changed files with 26 additions and 7 deletions

View File

@@ -1,9 +1,11 @@
use std::rc::Rc;
#[derive(Debug, Clone)]
pub struct List<T> {
head: Option<Rc<Node<T>>>,
}
#[derive(Debug, Clone)]
pub struct Node<T> {
data: T,
parent: Option<Rc<Node<T>>>,