We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe0f2f8 commit 6b70b3eCopy full SHA for 6b70b3e
src/main.rs
@@ -1,4 +1,5 @@
1
use std::{
2
+ collections::HashSet,
3
fs,
4
io::{ErrorKind, Read, stderr},
5
mem,
@@ -219,13 +220,9 @@ async fn main() -> anyhow::Result<()> {
219
220
ip_addr: bind.map(|ip| ip.to_string()),
221
port: gateway_port,
222
domains: Some({
- let mut domains = vec!["localhost".to_string()];
223
- for d in domain {
224
- if !domains.contains(&d) {
225
- domains.push(d);
226
- }
227
228
- domains
+ let mut domains: HashSet<String> = domain.into_iter().collect();
+ domains.insert("localhost".to_string());
+ domains.into_iter().collect()
229
}),
230
https_config: None,
231
});
0 commit comments