chore: remove unused Config type alias, add deny_unknown_fields to remaining config structs

This commit is contained in:
2026-03-31 23:45:00 +08:00
parent 1ded747a0c
commit 5770b7007c

View File

@@ -4,8 +4,6 @@ use std::collections::{HashMap, HashSet};
use std::fs;
use std::path::{Path, PathBuf};
pub type Config = AppConfig;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct AppConfig {
@@ -72,6 +70,7 @@ pub struct PerspectiveCorrectionConfig {
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ChromaKeyConfig {
#[serde(default)]
pub enabled: bool,
@@ -106,6 +105,7 @@ fn default_hsv_max() -> [i32; 3] {
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct BrightnessAdjustConfig {
#[serde(default)]
pub enabled: bool,
@@ -272,8 +272,9 @@ pub struct RemoteControlConfig {
pub port: u16,
}
/// BLE 配网配置(新增)
/// BLE 配网配置
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct BleConfig {
#[serde(default = "default_ble_enabled")]
pub enabled: bool,