We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55d622b commit ec402deCopy full SHA for ec402de
src/leetcode_env/list.rs
@@ -42,12 +42,6 @@ impl Debug for ListHead {
42
}
43
44
45
-impl ListHead {
46
- fn new(head: Option<Box<ListNode>>) -> Self {
47
- ListHead { head }
48
- }
49
-}
50
-
51
impl From<ListHead> for Option<Box<ListNode>> {
52
fn from(value: ListHead) -> Self {
53
value.head
src/leetcode_env/tree.rs
@@ -23,9 +23,7 @@ impl TreeNode {
23
right: None,
24
25
26
- fn wrapped_node(val: i32) -> Option<Rc<RefCell<Self>>> {
27
- Some(Rc::new(RefCell::new(Self::new(val))))
28
+
29
fn wrapped_node_maybe(val: Option<i32>) -> Option<Rc<RefCell<Self>>> {
30
val.map(|x| Rc::new(RefCell::new(Self::new(x))))
31
0 commit comments