Skip to content

Commit

Permalink
Fix a first round of lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
capnfabs committed Nov 19, 2021
1 parent d2d00d4 commit f86275a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
21 changes: 12 additions & 9 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 114,12 @@ pub enum DeviceType {
Tablet = 2,
Smartphone = 3,
Speaker = 4,
TV = 5,
AVR = 6,
STB = 7,
#[serde(rename = "t_v")]
Tv = 5,
#[serde(rename = "a_v_r")]
Avr = 6,
#[serde(rename = "s_t_b")]
Stb = 7,
AudioDongle = 8,
}

Expand All @@ -128,9 131,9 @@ impl From<LSDeviceType> for DeviceType {
LSDeviceType::Tablet => DeviceType::Tablet,
LSDeviceType::Smartphone => DeviceType::Smartphone,
LSDeviceType::Speaker => DeviceType::Speaker,
LSDeviceType::Tv => DeviceType::TV,
LSDeviceType::Avr => DeviceType::AVR,
LSDeviceType::Stb => DeviceType::STB,
LSDeviceType::Tv => DeviceType::Tv,
LSDeviceType::Avr => DeviceType::Avr,
LSDeviceType::Stb => DeviceType::Stb,
LSDeviceType::AudioDongle => DeviceType::AudioDongle,
// TODO: Implement new LibreSpot device types in Spotifyd
_ => DeviceType::Unknown,
Expand All @@ -146,9 149,9 @@ impl From<&DeviceType> for LSDeviceType {
DeviceType::Tablet => LSDeviceType::Tablet,
DeviceType::Smartphone => LSDeviceType::Smartphone,
DeviceType::Speaker => LSDeviceType::Speaker,
DeviceType::TV => LSDeviceType::Tv,
DeviceType::AVR => LSDeviceType::Avr,
DeviceType::STB => LSDeviceType::Stb,
DeviceType::Tv => LSDeviceType::Tv,
DeviceType::Avr => LSDeviceType::Avr,
DeviceType::Stb => LSDeviceType::Stb,
DeviceType::AudioDongle => LSDeviceType::AudioDongle,
}
}
Expand Down
1 change: 0 additions & 1 deletion src/setup.rs
Original file line number Diff line number Diff line change
@@ -1,7 1,6 @@
#[cfg(feature = "alsa_backend")]
use crate::alsa_mixer;
use crate::{config, main_loop};
use futures;
#[cfg(feature = "dbus_keyring")]
use keyring::Keyring;
use librespot_connect::discovery::discovery;
Expand Down
4 changes: 1 addition & 3 deletions src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 1,5 @@
use log::trace;
use std::env;
#[cfg(target_os = "macos")]
use whoami;

#[cfg(any(target_os = "freebsd", target_os = "linux"))]
fn get_shell_ffi() -> Option<String> {
Expand Down Expand Up @@ -97,6 95,6 @@ mod tests {
init_logger();

let shell = get_shell_ffi();
assert_eq!(shell.is_some(), true);
assert!(shell.is_some());
}
}

0 comments on commit f86275a

Please sign in to comment.