Rust functional solution (4 ms)
\nimpl Solution {\n    pub fn num_unique_emails(emails: Vec<String>) -> i32 {\n        use std::collections::HashSet;\n        emails\n            .iter()\n    
```\nimpl Solution {\n    pub fn num_unique_emails(emails: Vec<String>) -> i32 {\n        use std::collections::HashSet;\n        emails\n            .iter()\n            .map(|s| {\n                let (mut plus, mut domain) = (false, false);\n                s.chars()\n                    .filter(|&c| match c {\n                        _ if domain => true,\n                        \'+\' => {\n                            plus = true;\n                            false\n                        }\n                        \'@\' => {\n                            domain = true;\n                            true\n                        }\n                        _ if plus => false,\n                        \'.\' => false,\n                        _ => true,\n                    })\n                    .collect::<String>()\n            })\n            .collect::<HashSet<_>>()\n            .len() as _\n    }\n}\n```
['Rust']