diff --git a/src/modules/message_handler.rs b/src/modules/message_handler.rs index 636a51b..792959f 100644 --- a/src/modules/message_handler.rs +++ b/src/modules/message_handler.rs @@ -1,4 +1,4 @@ -use std::time::{SystemTime, Duration}; +use std::time::{SystemTime}; use super::{stream_states::{state_update::StateUpdate, stream_states_class::StreamState, enums::{SlideChange, Scenes}}, external_interface}; @@ -81,7 +81,7 @@ impl MessageHandler for StreamState { StateUpdate::ComputerMediaDoPause(value) => {external_interface::toggle_media_play_pause(value); return (Some(update), None)}, StateUpdate::UpdateClient => {}, StateUpdate::StreamRunning(_) => {}, - _ => {} + //_ => {} } (None, None) } @@ -119,7 +119,7 @@ fn test_tick_1() { let mut state = StreamState::new(); state.timer_finished = false; state.tick(); - std::thread::sleep(Duration::from_millis(1000)); + std::thread::sleep(std::time::Duration::from_millis(1000)); let update = state.tick(); state.update(update.0.unwrap()); assert_eq!(state.timer_text, "14.0"); @@ -130,7 +130,7 @@ fn test_tick_one_half() { let mut state = StreamState::new(); state.timer_finished = false; state.tick(); - std::thread::sleep(Duration::from_millis(500)); + std::thread::sleep(std::time::Duration::from_millis(500)); let update = state.tick(); state.update(update.0.unwrap()); assert_eq!(state.timer_text, "14.5"); @@ -142,7 +142,7 @@ fn test_tick_10() { let mut state = StreamState::new(); state.timer_finished = false; state.tick(); - std::thread::sleep(Duration::from_millis(10000)); + std::thread::sleep(std::time::Duration::from_millis(10000)); let update = state.tick(); state.update(update.0.unwrap()); assert_eq!(state.timer_text, "5.0"); diff --git a/src/tests/main_tests.rs b/src/tests/main_tests.rs index 1a723b6..2266115 100644 --- a/src/tests/main_tests.rs +++ b/src/tests/main_tests.rs @@ -1,6 +1,6 @@ use workctl::sync_flag; -use crate::modules::{message_handler::MessageHandler, stream_states::{ stream_states_class::StreamState, enums::Scenes, state_update::StateUpdate}}; +use crate::modules::{stream_states::{ stream_states_class::StreamState, enums::Scenes, state_update::StateUpdate}}; #[test] diff --git a/src/tests/message_handler_tests.rs b/src/tests/message_handler_tests.rs index 90e418c..38d88f7 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, enums::{Scenes}, stream_states_class::StreamState}}; +use crate::modules::{message_handler::{MessageHandler}, stream_states::{state_update::StateUpdate, stream_states_class::StreamState}}; #[test]