Rust solution
rust\nimpl Solution {\n    pub fn ambiguous_coordinates(s: String) -> Vec<String> {\n        let s = s.chars().skip(1).take(s.len() - 2).collect::<Vec<_>>();\n 
```rust\nimpl Solution {\n    pub fn ambiguous_coordinates(s: String) -> Vec<String> {\n        let s = s.chars().skip(1).take(s.len() - 2).collect::<Vec<_>>();\n        let candidates = |v: &[char]| -> Vec<String> {\n            (0..v.len())\n                .filter_map(|i| {\n                    let s: String = if i == 0 {\n                        v.iter().collect()\n                    } else {\n                        v[..i]\n                            .iter()\n                            .chain(std::iter::once(&\'.\'))\n                            .chain(v[i..].iter())\n                            .collect()\n                    };\n                    if (s != "0" && s.starts_with(\'0\') && !s.starts_with("0."))\n                        || (s.contains(\'.\') && s.ends_with(\'0\'))\n                    {\n                        None\n                    } else {\n                        Some(s)\n                    }\n                })\n                .collect()\n        };\n        let mut answer = Vec::new();\n        for i in 1..s.len() {\n            for x in &candidates(&s[..i]) {\n                for y in &candidates(&s[i..]) {\n                    answer.push(format!("({}, {})", x, y));\n                }\n            }\n        }\n        answer\n    }\n}\n```
['Rust']