Skip to content

Commit 65f7efc

Browse files
committed
Remove explicit values in DeviceType enum
1 parent 91782f6 commit 65f7efc

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/config.rs

+19-19
Original file line numberDiff line numberDiff line change
@@ -146,28 +146,28 @@ static DEVICETYPE_VALUES: &[&str] = &[
146146
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Eq, StructOpt)]
147147
#[serde(rename_all = "snake_case")]
148148
pub enum DeviceType {
149-
Unknown = 0,
150-
Computer = 1,
151-
Tablet = 2,
152-
Smartphone = 3,
153-
Speaker = 4,
149+
Unknown,
150+
Computer,
151+
Tablet,
152+
Smartphone,
153+
Speaker,
154154
#[serde(rename = "t_v")]
155-
Tv = 5,
155+
Tv,
156156
#[serde(rename = "a_v_r")]
157-
Avr = 6,
157+
Avr,
158158
#[serde(rename = "s_t_b")]
159-
Stb = 7,
160-
AudioDongle = 8,
161-
GameConsole = 9,
162-
CastAudio = 10,
163-
CastVideo = 11,
164-
Automobile = 12,
165-
Smartwatch = 13,
166-
Chromebook = 14,
167-
UnknownSpotify = 15,
168-
CarThing = 16,
169-
Observer = 17,
170-
HomeThing = 18,
159+
Stb,
160+
AudioDongle,
161+
GameConsole,
162+
CastAudio,
163+
CastVideo,
164+
Automobile,
165+
Smartwatch,
166+
Chromebook,
167+
UnknownSpotify,
168+
CarThing,
169+
Observer,
170+
HomeThing,
171171
}
172172

173173
impl From<LSDeviceType> for DeviceType {

0 commit comments

Comments
 (0)