[Rust]
\nimpl Solution {\n    pub fn insertion_sort_list(head: Option<Box<ListNode>>) -> Option<Box<ListNode>> {\n        let mut head = head;\n        let mut new_hea
```\nimpl Solution {\n    pub fn insertion_sort_list(head: Option<Box<ListNode>>) -> Option<Box<ListNode>> {\n        let mut head = head;\n        let mut new_head = ListNode::new(0);\n        while let Some(mut boxed) = head.take() {\n            head = boxed.next.take();\n            let mut ptr = &mut new_head;\n            // ptr.next should be the first element bigger than or equal to boxed.val or None.\n            while ptr.next.as_ref().is_some() && ptr.next.as_ref().unwrap().val < boxed.val {\n                ptr = ptr.next.as_mut().unwrap();\n            }\n            boxed.next = ptr.next.take();\n            ptr.next = Some(boxed);\n        }\n        new_head.next\n    }\n}\n```
[]