fix clippy warnings in scene and host paths
This commit is contained in:
@@ -175,6 +175,7 @@ impl HostAudio {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::items_after_test_module)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::stats::HostStats;
|
||||
|
||||
@@ -54,15 +54,13 @@ impl HostInputHandler {
|
||||
self.signals.y_pos = v.1;
|
||||
}
|
||||
|
||||
WindowEvent::MouseInput { state, button, .. } => {
|
||||
if *button == MouseButton::Left {
|
||||
match state {
|
||||
ElementState::Pressed => {
|
||||
self.signals.f_signal = true;
|
||||
}
|
||||
ElementState::Released => {
|
||||
self.signals.f_signal = false;
|
||||
}
|
||||
WindowEvent::MouseInput { state, button, .. } if *button == MouseButton::Left => {
|
||||
match state {
|
||||
ElementState::Pressed => {
|
||||
self.signals.f_signal = true;
|
||||
}
|
||||
ElementState::Released => {
|
||||
self.signals.f_signal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -782,10 +782,10 @@ mod tests {
|
||||
break;
|
||||
}
|
||||
|
||||
if let Ok(resp) = serde_json::from_str::<serde_json::Value>(&line) {
|
||||
if resp["type"] == "getState" {
|
||||
return;
|
||||
}
|
||||
if let Ok(resp) = serde_json::from_str::<serde_json::Value>(&line)
|
||||
&& resp["type"] == "getState"
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
panic!("Did not receive getState response");
|
||||
|
||||
Reference in New Issue
Block a user