aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/state.rs
diff options
context:
space:
mode:
authorEskil Queseth <eskilq@kth.se>2020-11-05 00:44:48 +0100
committerEskil Queseth <eskilq@kth.se>2020-11-05 00:44:48 +0100
commit7a4e0c79be76444a8f3a8d4019175a8eb84d333e (patch)
treeff4277bdeafd4aaf1c18a6d80c14ddc1c529ac89 /mumd/src/state.rs
parent22579ced3d1d847a14683fe3b47fa2076df01751 (diff)
downloadmum-7a4e0c79be76444a8f3a8d4019175a8eb84d333e.tar.gz
cargo fmt
Diffstat (limited to 'mumd/src/state.rs')
-rw-r--r--mumd/src/state.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/mumd/src/state.rs b/mumd/src/state.rs
index f04e6f1..5781df3 100644
--- a/mumd/src/state.rs
+++ b/mumd/src/state.rs
@@ -71,7 +71,8 @@ impl State {
let config = mumlib::config::read_default_cfg();
let audio = Audio::new(
config.audio.input_volume.unwrap_or(1.0),
- config.audio.output_volume.unwrap_or(1.0));
+ config.audio.output_volume.unwrap_or(1.0),
+ );
let mut state = Self {
config,
server: None,
@@ -245,7 +246,7 @@ impl State {
None
}
}
- None => Some(!self.server().unwrap().deafened())
+ None => Some(!self.server().unwrap().deafened()),
};
if let Some(action) = action {
@@ -273,7 +274,7 @@ impl State {
None
}
}
- None => Some(!self.server().unwrap().muted())
+ None => Some(!self.server().unwrap().muted()),
};
if let Some(action) = action {
@@ -293,7 +294,12 @@ impl State {
return now!(Err(Error::DisconnectedError));
}
- let id = self.server_mut().unwrap().users_mut().iter_mut().find(|(_, user)| user.name() == &string);
+ let id = self
+ .server_mut()
+ .unwrap()
+ .users_mut()
+ .iter_mut()
+ .find(|(_, user)| user.name() == &string);
let (id, user) = match id {
Some(id) => (*id.0, id.1),
@@ -308,7 +314,7 @@ impl State {
None
}
}
- None => Some(!user.suppressed())
+ None => Some(!user.suppressed()),
};
debug!("{:?}", action);