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,16 +59,16 @@ 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},
|
||||||
StateUpdate::ChangeSceneOnChangeSlideHotkey(new_val) => {self.change_scene_on_change_slide_hotkey = new_val; self},
|
StateUpdate::ChangeSceneOnChangeSlideHotkey(new_val) => {self.change_scene_on_change_slide_hotkey = new_val; self},
|
||||||
StateUpdate::TimerCanRun(new_val) => {self.timer_can_run = new_val; self},
|
StateUpdate::TimerCanRun(new_val) => {self.timer_can_run = new_val; self},
|
||||||
StateUpdate::TimerLength(new_val) => {self.timer_length = new_val; self},
|
StateUpdate::TimerLength(new_val) => {self.timer_length = new_val; self},
|
||||||
StateUpdate::TimerText(new_val) => {self.timer_text = new_val; self},
|
StateUpdate::TimerText(new_val) => {self.timer_text = new_val; self},
|
||||||
StateUpdate::Scene(new_val) => {self.change_scene(&new_val)},
|
StateUpdate::Scene(new_val) => {self.change_scene(&new_val)},
|
||||||
StateUpdate::SceneIsAugmented(new_val) => {
|
StateUpdate::SceneIsAugmented(new_val) => {
|
||||||
self.scene_is_augmented = new_val;
|
self.scene_is_augmented = new_val;
|
||||||
self.change_scene(&enums::Scenes::Augmented)},
|
self.change_scene(&enums::Scenes::Augmented)},
|
||||||
|
|
0
src/tests/message_handler_tests.rs
Normal file
0
src/tests/message_handler_tests.rs
Normal file
Loading…
Reference in a new issue