renames, spacing adding, and derivings added
This commit is contained in:
parent
ea48484fc2
commit
cb6e8ccf91
2 changed files with 11 additions and 8 deletions
|
@ -1,5 +1,8 @@
|
||||||
|
use std::{sync::mpsc::Receiver, thread};
|
||||||
|
|
||||||
use super::enums::{self};
|
use super::enums::{self};
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
pub enum StateUpdate {
|
pub enum StateUpdate {
|
||||||
StreamRunning(bool),
|
StreamRunning(bool),
|
||||||
StreamIsMuted(bool),
|
StreamIsMuted(bool),
|
||||||
|
@ -56,8 +59,8 @@ impl StreamStates {
|
||||||
StreamStates{..Default::default()}
|
StreamStates{..Default::default()}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update(mut self, updateMessage: StateUpdate) -> Self {
|
pub fn update(mut self, update: StateUpdate) -> Self {
|
||||||
match updateMessage {
|
match update {
|
||||||
StateUpdate::StreamRunning(new_val) => {self.stream_running = new_val; self},
|
StateUpdate::StreamRunning(new_val) => {self.stream_running = new_val; self},
|
||||||
StateUpdate::StreamIsMuted(new_val) => {self.stream_is_muted = new_val; self},
|
StateUpdate::StreamIsMuted(new_val) => {self.stream_is_muted = new_val; self},
|
||||||
StateUpdate::ComputerSoundIsOn(new_val) => {self.computer_sound_is_on = new_val; self},
|
StateUpdate::ComputerSoundIsOn(new_val) => {self.computer_sound_is_on = new_val; self},
|
||||||
|
|
0
src/tests/message_handler_tests.rs
Normal file
0
src/tests/message_handler_tests.rs
Normal file
Loading…
Reference in a new issue