Skip to content

Commit

Permalink
Fix style warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmay committed Sep 17, 2023
1 parent 80379fe commit 8dce33a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
12 changes: 6 additions & 6 deletions brian-backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fn brian_config(passage_light: &LightConfig) -> UiConfig {
},
],
}],
hdmis: vec![],
hdmi_matrix: vec![],
}
}

Expand All @@ -224,7 +224,7 @@ fn jan_config(passage_light: &LightConfig) -> UiConfig {
..Default::default()
}],
switches: vec![],
hdmis: vec![],
hdmi_matrix: vec![],
}
}

Expand Down Expand Up @@ -255,7 +255,7 @@ fn twins_config() -> UiConfig {
..Default::default()
}],
switches: vec![],
hdmis: vec![],
hdmi_matrix: vec![],
}
}

Expand Down Expand Up @@ -308,7 +308,7 @@ fn dining_config(passage_light: &LightConfig, hdmi_inputs: &[HdmiInputConfig]) -
},
],
}],
hdmis: vec![HdmiConfig {
hdmi_matrix: vec![HdmiConfig {
title: "Dining TV".to_string(),
topic_substr: "Dining/TV".to_string(),
output_id: 1,
Expand Down Expand Up @@ -495,7 +495,7 @@ struct UiConfig {
lights: Vec<LightConfig>,
music: Vec<MusicConfig>,
switches: Vec<ButtonRowConfig>,
hdmis: Vec<HdmiConfig>,
hdmi_matrix: Vec<HdmiConfig>,
}

impl From<LightConfig> for ButtonRowConfig {
Expand Down Expand Up @@ -620,7 +620,7 @@ impl From<UiConfig> for Vec<ButtonRowConfig> {
buttons.push(switch);
}

for hdmi in config.hdmis {
for hdmi in config.hdmi_matrix {
buttons.push(ButtonRowConfig::from(hdmi));
}

Expand Down
2 changes: 1 addition & 1 deletion robotica-frontend/src/components/welcome.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::services::websocket::WebsocketService;
use crate::services::websocket::WsEvent;
use wasm_bindgen_futures::spawn_local;
use yew::functional::*;
use yew::functional::{function_component, use_context, use_mut_ref, use_state};
use yew::prelude::*;

#[function_component(Welcome)]
Expand Down
6 changes: 5 additions & 1 deletion robotica-frontend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// This code will not be used on concurrent threads.
#![allow(clippy::future_not_send)]
#![allow(clippy::let_unit_value)]
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::missing_panics_doc)]
#![allow(clippy::option_if_let_else)]

mod components;
mod services;
Expand Down Expand Up @@ -39,7 +42,7 @@ use components::welcome::Welcome;
use crate::components::rooms::Room;

#[derive(Debug, Clone, Eq, PartialEq, Routable)]
pub enum Route {
enum Route {
#[at("/welcome")]
Welcome,
#[at("/room/:id")]
Expand Down Expand Up @@ -150,6 +153,7 @@ fn app() -> Html {
}
}

/// The entry point for the frontend
#[wasm_bindgen(start)]
pub fn run() -> Result<(), JsValue> {
console_error_panic_hook::set_once();
Expand Down

0 comments on commit 8dce33a

Please sign in to comment.