Add the with_additional_node function to the ContextTree.

This commit is contained in:
Tom Alexander
2022-12-03 21:06:04 -05:00
parent c0e51298b6
commit bc91775880
3 changed files with 10 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ impl<T> List<T> {
}
}
pub fn get_data(&self) -> &T {
&self.data
pub fn get_data(&self) -> Option<&T> {
self.head.map(|rc_node| &rc_node.as_ref().data)
}
}