Skip to content

Commit

Permalink
rename variables to not use local_
Browse files Browse the repository at this point in the history
  • Loading branch information
eladyn committed Feb 20, 2022
1 parent c2e8793 commit 497c0cb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ use std::str::FromStr;
pub(crate) fn initial_state(config: config::SpotifydConfig) -> main_loop::MainLoop {
#[cfg(feature = "alsa_backend")]
let mut mixer = {
let local_audio_device = config.audio_device.clone();
let local_control_device = config.control_device.clone();
let local_mixer = config.mixer.clone();
let audio_device = config.audio_device.clone();
let control_device = config.control_device.clone();
let mixer = config.mixer.clone();
match config.volume_controller {
config::VolumeController::SoftVolume => {
info!("Using software volume controller.");
Expand All @@ -40,11 +40,11 @@ pub(crate) fn initial_state(config: config::SpotifydConfig) -> main_loop::MainLo
);
Box::new(move || {
Box::new(alsa_mixer::AlsaMixer {
device: local_control_device
device: control_device
.clone()
.or_else(|| local_audio_device.clone())
.or_else(|| audio_device.clone())
.unwrap_or_else(|| "default".to_string()),
mixer: local_mixer.clone().unwrap_or_else(|| "Master".to_string()),
mixer: mixer.clone().unwrap_or_else(|| "Master".to_string()),
linear_scaling: linear,
}) as Box<dyn mixer::Mixer>
}) as Box<dyn FnMut() -> Box<dyn Mixer>>
Expand Down

0 comments on commit 497c0cb

Please sign in to comment.