Skip to content

Commit

Permalink
fix: warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sequal32 committed Mar 27, 2023
1 parent d004f9d commit 3966731
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/yourcontrols-net/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl SenderReceiver {

// Compress
self.compressor
.set_compression_level(get_compression_level_for_message(message));
.set_compression_level(get_compression_level_for_message(message))?;

let compressed = self.compressor.compress(&payload_bytes)?;

Expand Down
3 changes: 2 additions & 1 deletion src/yourcontrols/src/app.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::simconfig;

use base64::Engine;
use crossbeam_channel::{unbounded, Receiver, TryRecvError};
use laminar::Metrics;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -120,7 +121,7 @@ impl App {
jquery = include_str!("../web/jquery.min.js"),
bootstrapjs = include_str!("../web/bootstrap.bundle.min.js"),
bootstrapcss = include_str!("../web/bootstrap.min.css"),
logo = base64::encode(logo.as_slice())
logo = base64::engine::general_purpose::STANDARD_NO_PAD.encode(logo.as_slice())
)))
.invoke_handler(move |_, arg| {
tx.try_send(serde_json::from_str(arg).unwrap()).ok();
Expand Down
4 changes: 1 addition & 3 deletions src/yourcontrols/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#![allow(unaligned_references)]

mod app;
Expand Down Expand Up @@ -356,8 +356,6 @@ fn main() {
name, in_control, is_observer, is_server
);

let mut is_observer = is_observer;

// This should be before the if statement as server_started counts the number of clients connected
clients.add_client(name.clone());

Expand Down

0 comments on commit 3966731

Please sign in to comment.