diff --git a/ectool/src/charge_current_limit_subcommand.rs b/ectool/src/charge_current_limit_subcommand.rs index 22ead40..7fdcd4f 100644 --- a/ectool/src/charge_current_limit_subcommand.rs +++ b/ectool/src/charge_current_limit_subcommand.rs @@ -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::(limit.into()))?; + set_charge_current_limit(&mut file, ElectricCurrent::new::(limit as f32))?; Ok(()) }