Fix warnings
This commit is contained in:
@@ -3,7 +3,6 @@ use std::time::Duration;
|
|||||||
use clap::{Arg, Command};
|
use clap::{Arg, Command};
|
||||||
use hyper_x_cloud_ii_wireless::devices::{cloud_ii_wireless_dts::CloudIIWirelessDTS, Device};
|
use hyper_x_cloud_ii_wireless::devices::{cloud_ii_wireless_dts::CloudIIWirelessDTS, Device};
|
||||||
|
|
||||||
//TODO: error handling e.g. reconnect on "no such device" error
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let matches = Command::new(env!("CARGO_PKG_NAME"))
|
let matches = Command::new(env!("CARGO_PKG_NAME"))
|
||||||
.version(env!("CARGO_PKG_VERSION"))
|
.version(env!("CARGO_PKG_VERSION"))
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
use std::sync::{Arc, RwLock};
|
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
mod status_tray;
|
mod status_tray;
|
||||||
use status_tray::{StatusTray, TrayHandler};
|
use status_tray::{StatusTray, TrayHandler};
|
||||||
use hyper_x_cloud_ii_wireless::devices::{connect_compatible_device, Device, DeviceError};
|
use hyper_x_cloud_ii_wireless::devices::{connect_compatible_device, DeviceError};
|
||||||
|
|
||||||
fn handle_error(error: DeviceError) -> String {
|
fn handle_error(error: DeviceError) -> String {
|
||||||
match error {
|
match error {
|
||||||
@@ -23,6 +22,7 @@ fn handle_error(error: DeviceError) -> String {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: error handling e.g. reconnect on "no such device" error
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut device = loop {
|
let mut device = loop {
|
||||||
match connect_compatible_device() {
|
match connect_compatible_device() {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
use hyper_x_cloud_ii_wireless::devices::{Device, DeviceState};
|
use hyper_x_cloud_ii_wireless::devices::DeviceState;
|
||||||
use ksni::{menu::StandardItem, Handle, MenuItem, ToolTip, Tray, TrayService};
|
use ksni::{menu::StandardItem, Handle, MenuItem, ToolTip, Tray, TrayService};
|
||||||
use std::sync::{Arc, RwLock, RwLockReadGuard};
|
|
||||||
|
|
||||||
pub struct TrayHandler {
|
pub struct TrayHandler {
|
||||||
handle: Handle<StatusTray>,
|
handle: Handle<StatusTray>,
|
||||||
|
|||||||
Reference in New Issue
Block a user