use hash set

This commit is contained in:
yggverse 2026-03-05 21:24:37 +02:00
parent d4582589f9
commit 105409a76b
2 changed files with 7 additions and 3 deletions

View file

@ -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<String>,
pub format_time: String,
pub host: IpAddr,
pub masters: Vec<SocketAddr>,
pub masters: HashSet<SocketAddr>,
pub port: u16,
pub title: String,
}

View file

@ -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<std::net::SocketAddr>,
pub masters: HashSet<std::net::SocketAddr>,
}