Skip to content

Commit

Permalink
refactor: cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
HuakunShen committed Jun 6, 2024
1 parent afa6f9d commit 2893882
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .changes/V1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-plugin-system-info": "major"
"tauri-plugin-system-info-api": "major"
---

Version 1.0. v1.x will be for Tauri v1, and v2.x will be for Tauri v2.
13 changes: 2 additions & 11 deletions src/bin/battery.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
use uom::si::thermodynamic_temperature::*;
use uom::si::time::second;

fn main() -> Result<(), starship_battery::Error> {
let manager = starship_battery::Manager::new()?;

Expand All @@ -18,10 +15,7 @@ fn main() -> Result<(), starship_battery::Error> {
println!("state_of_health: {:?}", state_of_health);
println!("state: {:?}", battery.state());
println!("technology: {:?}", battery.technology());
println!(
"temperature: {:?}",
battery.temperature().unwrap().get::<degree_celsius>()
);
println!("temperature: {:?}", battery.temperature());
let cycle_count = battery.cycle_count();
println!("cycle_count: {:?}", cycle_count);
println!("vendor: {:?}", battery.vendor());
Expand All @@ -31,10 +25,7 @@ fn main() -> Result<(), starship_battery::Error> {
// "time_to_full: {:?}",
// battery.time_to_full().unwrap().get::<second>()
// );
println!(
"time_to_empty: {:?}",
battery.time_to_empty().unwrap().get::<second>()
);
println!("time_to_empty: {:?}", battery.time_to_empty());
}

Ok(())
Expand Down
7 changes: 1 addition & 6 deletions src/model/common.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
use serde::{Deserialize, Serialize};
use starship_battery::units::{
ElectricPotential, Energy, Power, Ratio, ThermodynamicTemperature, Time,
};
use std::{ffi::OsStr, path::PathBuf};
// use sysinfo::{ComponentExt, CpuExt, DiskExt, NetworkExt, PidExt, ProcessExt};
use uom::si::thermodynamic_temperature::{degree_celsius, degree_fahrenheit};
use std::path::PathBuf;

#[derive(Debug, Serialize, Deserialize)]
pub enum DiskKind {
Expand Down

0 comments on commit 2893882

Please sign in to comment.