fix(linux-rust): format and fix syntax error

This commit is contained in:
doprz
2025-12-12 21:52:32 -06:00
committed by Kavish Devar
parent 902b12a227
commit c852b726de
19 changed files with 2047 additions and 1391 deletions

View File

@@ -1,15 +1,14 @@
use std::fmt::Display;
use iced::widget::combo_box;
use serde::{Deserialize, Serialize};
use crate::bluetooth::aacp::BatteryInfo;
use crate::devices::airpods::AirPodsInformation;
use crate::devices::nothing::NothingInformation;
use iced::widget::combo_box;
use serde::{Deserialize, Serialize};
use std::fmt::Display;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(PartialEq)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum DeviceType {
AirPods,
Nothing
Nothing,
}
impl Display for DeviceType {
@@ -21,12 +20,11 @@ impl Display for DeviceType {
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "kind", content = "data")]
pub enum DeviceInformation {
AirPods(AirPodsInformation),
Nothing(NothingInformation)
Nothing(NothingInformation),
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -36,7 +34,6 @@ pub struct DeviceData {
pub information: Option<DeviceInformation>,
}
#[derive(Clone, Debug)]
pub enum DeviceState {
AirPods(AirPodsState),
@@ -60,7 +57,7 @@ pub struct AirPodsState {
pub conversation_awareness_enabled: bool,
pub personalized_volume_enabled: bool,
pub allow_off_mode: bool,
pub battery: Vec<BatteryInfo>
pub battery: Vec<BatteryInfo>,
}
#[derive(Clone, Debug)]
@@ -68,7 +65,7 @@ pub enum AirPodsNoiseControlMode {
Off,
NoiseCancellation,
Transparency,
Adaptive
Adaptive,
}
impl Display for AirPodsNoiseControlMode {
@@ -115,7 +112,7 @@ pub enum NothingAncMode {
MidNoiseCancellation,
HighNoiseCancellation,
AdaptiveNoiseCancellation,
Transparency
Transparency,
}
impl Display for NothingAncMode {
@@ -152,4 +149,4 @@ impl NothingAncMode {
NothingAncMode::Off => 0x05,
}
}
}
}