rust safe code one pass(has to use clone to bypass borrow checker)
\nimpl Solution {\n    pub fn remove_nth_from_end(head: Option<Box<ListNode>>, n: i32) -> Option<Box<ListNode>> {\n        let mut dummy = ListNode::new(0);\n  
```\nimpl Solution {\n    pub fn remove_nth_from_end(head: Option<Box<ListNode>>, n: i32) -> Option<Box<ListNode>> {\n        let mut dummy = ListNode::new(0);\n        dummy.next = head;\n        let mut dummy = Box::new(dummy);\n        let mut fast = dummy.clone();\n        let mut slow =  dummy.as_mut();\n        // move fast n forward\n        for _ in 0..n {\n            fast = fast.next.unwrap();\n        }\n\n        while fast.next.is_some() {\n            fast = fast.next.unwrap();\n            slow = slow.next.as_mut().unwrap();\n        }\n        let next = slow.next.as_mut().unwrap();\n        slow.next = next.next.clone();\n        dummy.next\n    }\n}\n```
['Rust']