Implement the structure to the check_fail_matcher function.
This commit is contained in:
@@ -25,7 +25,17 @@ impl<T> List<T> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn without_front(&self) -> List<T> {
|
||||
List {
|
||||
head: self.head.as_ref().map(|node| node.parent.clone()).flatten()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_data(&self) -> Option<&T> {
|
||||
self.head.as_ref().map(|rc_node| &rc_node.data)
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.head.is_none()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user