From b974bc5b59cdb16ef0d2687f6bef164a2f9369f4 Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Fri, 24 Jun 2022 19:19:30 -0700 Subject: [PATCH] renamed stream_states_class -> stream_state --- src/main.rs | 2 +- src/modules/message_handler.rs | 2 +- src/modules/mod.rs | 2 +- .../{stream_states_class.rs => stream_state.rs} | 0 src/tests/main_tests.rs | 2 +- src/tests/message_handler_tests.rs | 2 +- src/tests/stream_states_tests.rs | 8 ++++---- 7 files changed, 9 insertions(+), 9 deletions(-) rename src/modules/stream_states/{stream_states_class.rs => stream_state.rs} (100%) diff --git a/src/main.rs b/src/main.rs index d530084..5a8fc9e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use std::{time::Duration, thread, io::Read}; use crossbeam_channel::unbounded; -use modules::{socket_handler::Socket, stream_states::stream_states_class::StreamState, message_handler::{MessageHandler}, external_interface::{Hotkeys, OPTIONS_PATH}}; +use modules::{socket_handler::Socket, stream_states::stream_state::StreamState, message_handler::{MessageHandler}, external_interface::{Hotkeys, OPTIONS_PATH}}; use workctl::sync_flag; use crate::modules::stream_states::state_update::StateUpdate; diff --git a/src/modules/message_handler.rs b/src/modules/message_handler.rs index 23d810a..220a03f 100644 --- a/src/modules/message_handler.rs +++ b/src/modules/message_handler.rs @@ -1,6 +1,6 @@ use std::time::{SystemTime}; -use super::{stream_states::{state_update::StateUpdate, stream_states_class::StreamState, scenes::{SlideChange, Scenes}}, external_interface::{Hotkeys}}; +use super::{stream_states::{state_update::StateUpdate, stream_state::StreamState, scenes::{SlideChange, Scenes}}, external_interface::{Hotkeys}}; pub trait MessageHandler { //the first one goes to socket, the second propogates fn handle_update(&mut self, update: StateUpdate, hotkey_handler: &Hotkeys) diff --git a/src/modules/mod.rs b/src/modules/mod.rs index 7829c25..bfe706d 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -4,7 +4,7 @@ pub mod socket_handler; pub mod external_interface; pub mod stream_states { - pub mod stream_states_class; + pub mod stream_state; pub mod state_update; pub mod scenes; } \ No newline at end of file diff --git a/src/modules/stream_states/stream_states_class.rs b/src/modules/stream_states/stream_state.rs similarity index 100% rename from src/modules/stream_states/stream_states_class.rs rename to src/modules/stream_states/stream_state.rs diff --git a/src/tests/main_tests.rs b/src/tests/main_tests.rs index 0b6c168..7663800 100644 --- a/src/tests/main_tests.rs +++ b/src/tests/main_tests.rs @@ -1,6 +1,6 @@ use workctl::sync_flag; -use crate::modules::{stream_states::{ stream_states_class::StreamState, scenes::Scenes, state_update::StateUpdate}}; +use crate::modules::{stream_states::{ stream_state::StreamState, scenes::Scenes, state_update::StateUpdate}}; #[test] diff --git a/src/tests/message_handler_tests.rs b/src/tests/message_handler_tests.rs index 621fb24..aedb013 100644 --- a/src/tests/message_handler_tests.rs +++ b/src/tests/message_handler_tests.rs @@ -1,4 +1,4 @@ -use crate::modules::{message_handler::{MessageHandler}, stream_states::{state_update::StateUpdate, stream_states_class::StreamState}, external_interface::Hotkeys}; +use crate::modules::{message_handler::{MessageHandler}, stream_states::{state_update::StateUpdate, stream_state::StreamState}, external_interface::Hotkeys}; #[test] diff --git a/src/tests/stream_states_tests.rs b/src/tests/stream_states_tests.rs index 5d82797..d587509 100644 --- a/src/tests/stream_states_tests.rs +++ b/src/tests/stream_states_tests.rs @@ -27,7 +27,7 @@ fn has_all_enums() { #[test] fn create_stream_states_class() { - let stream_state = s_s::stream_states_class::StreamState::new(); + let stream_state = s_s::stream_state::StreamState::new(); assert_eq!(stream_state.stream_running, false); assert_eq!(stream_state.stream_is_muted, false); assert_eq!(stream_state.computer_sound_is_on, true); @@ -46,7 +46,7 @@ fn create_stream_states_class() { #[test] fn scene_correctness(){ - let mut stream_state = s_s::stream_states_class::StreamState::new(); + let mut stream_state = s_s::stream_state::StreamState::new(); assert_eq!(stream_state.current_scene, s_s::scenes::Scenes::Camera); assert_eq!(stream_state.camera_sub_scene, s_s::scenes::SubScenes::CameraDefault); assert_eq!(stream_state.screen_sub_scene, s_s::scenes::SubScenes::ScreenDefault); @@ -93,7 +93,7 @@ fn scene_correctness(){ #[test] fn test_updating() { - let mut stream_state = s_s::stream_states_class::StreamState::new(); + let mut stream_state = s_s::stream_state::StreamState::new(); assert_eq!(stream_state.timer_can_run, true); stream_state.update(StateUpdate::TimerCanRun(false)); @@ -134,7 +134,7 @@ fn can_run_in_thread() { let (tx, rx) = mpsc::channel(); let rx_thread = thread::spawn(move || { - let mut stream_state = s_s::stream_states_class::StreamState::new(); + let mut stream_state = s_s::stream_state::StreamState::new(); for received in rx { assert_eq!(received, StateUpdate::StreamRunning(true)); stream_state.update(received);