Skip to content

Commit

Permalink
fix: use lossy conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed Oct 28, 2024
1 parent e497559 commit 10417b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ectool/src/charge_current_limit_subcommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ use uom::si::electric_current::{milliampere, ElectricCurrent};

pub fn charge_current_limit_subcommand(limit: u32) -> Result<()> {
let mut file = File::open(CROS_EC_PATH)?;
set_charge_current_limit(&mut file, ElectricCurrent::new::<milliampere>(limit.into()))?;
set_charge_current_limit(&mut file, ElectricCurrent::new::<milliampere>(limit as f32))?;
Ok(())
}

0 comments on commit 10417b1

Please sign in to comment.