From 105409a76baaf1566c1be8c31c8c5ea5f7175e9a Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 5 Mar 2026 21:24:37 +0200 Subject: [PATCH] use hash set --- crates/httpd/src/config.rs | 7 +++++-- crates/httpd/src/global.rs | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/httpd/src/config.rs b/crates/httpd/src/config.rs index bef9685..99277b6 100644 --- a/crates/httpd/src/config.rs +++ b/crates/httpd/src/config.rs @@ -1,5 +1,8 @@ use serde::Deserialize; -use std::net::{IpAddr, SocketAddr}; +use std::{ + collections::HashSet, + net::{IpAddr, SocketAddr}, +}; #[derive(Debug, Deserialize)] pub struct Config { @@ -7,7 +10,7 @@ pub struct Config { pub description: Option, pub format_time: String, pub host: IpAddr, - pub masters: Vec, + pub masters: HashSet, pub port: u16, pub title: String, } diff --git a/crates/httpd/src/global.rs b/crates/httpd/src/global.rs index 0018901..56bb4d0 100644 --- a/crates/httpd/src/global.rs +++ b/crates/httpd/src/global.rs @@ -1,8 +1,9 @@ use rocket::serde::Serialize; +use std::collections::HashSet; #[derive(Clone, Debug, Serialize)] #[serde(crate = "rocket::serde")] pub struct Global { pub format_time: String, - pub masters: Vec, + pub masters: HashSet, }