Added #[allow(unused_imports)] on hashset - gives warning while compiling on windows
Added Debug, PartialEq to Platform enum
This commit is contained in:
parent
560095e0a7
commit
560b90be55
2 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
use std::{io::BufReader, fs::File, collections::HashSet};
|
||||
use std::{io::BufReader, fs::File};
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use std::collections::hash_set;
|
||||
|
||||
use crate::{battery::{stats::get_battery_info, structs::ChargingStatus}, USE_FALLBACK_DOCK_DETECTION};
|
||||
|
||||
|
@ -33,6 +36,7 @@ pub fn get_dock_info() -> Result<DockInfo, Box<dyn std::error::Error>> {
|
|||
}
|
||||
|
||||
/* Reads the dock_models.json file and returns a vector of structs with the data */
|
||||
#[allow(dead_code)]
|
||||
pub fn read_dock_models_from_file() -> Result<Vec<Dock>, Box<dyn std::error::Error>> {
|
||||
let file = File::open("Resources/dock_models.json")?;
|
||||
let reader = BufReader::new(file);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
#[derive(Deserialize, Serialize, Debug, PartialEq)]
|
||||
pub enum Platform {
|
||||
WINDOWS = 0,
|
||||
LINUX = 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue