Cleanup.
This commit is contained in:
@@ -26,7 +26,6 @@ impl<T> Node<T> {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: This Debug is only needed because of the try_unwrap+expect
|
||||
impl<T> List<T> {
|
||||
pub fn new() -> Self {
|
||||
List { head: None }
|
||||
@@ -47,7 +46,7 @@ impl<T> List<T> {
|
||||
Some(popped_node) => {
|
||||
let extracted_node = match Rc::try_unwrap(popped_node) {
|
||||
Ok(node) => node,
|
||||
Err(e) => panic!("try_unwrap failed on Rc in pop_front on List."),
|
||||
Err(_) => panic!("try_unwrap failed on Rc in pop_front on List."),
|
||||
};
|
||||
(
|
||||
Some(extracted_node.data),
|
||||
|
||||
Reference in New Issue
Block a user