renames, spacing adding, and derivings added

This commit is contained in:
Nickiel12 2021-12-11 02:23:45 -08:00
parent ea48484fc2
commit cb6e8ccf91
2 changed files with 11 additions and 8 deletions

View file

@ -1,5 +1,8 @@
use std::{sync::mpsc::Receiver, thread};
use super::enums::{self};
#[derive(Debug, PartialEq, Clone)]
pub enum StateUpdate {
StreamRunning(bool),
StreamIsMuted(bool),
@ -56,8 +59,8 @@ impl StreamStates {
StreamStates{..Default::default()}
}
pub fn update(mut self, updateMessage: StateUpdate) -> Self {
match updateMessage {
pub fn update(mut self, update: StateUpdate) -> Self {
match update {
StateUpdate::StreamRunning(new_val) => {self.stream_running = 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},

View file