From a64baa9e7604550a1ed1e82a85c2262596c6dadb Mon Sep 17 00:00:00 2001 From: Rajas Paranjpe <52586855+ChocolateLoverRaj@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:32:18 -0700 Subject: [PATCH] Use trait for File in `fp_mode` --- crosec/src/commands/fp_mode.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crosec/src/commands/fp_mode.rs b/crosec/src/commands/fp_mode.rs index fc9980e..8a632ca 100644 --- a/crosec/src/commands/fp_mode.rs +++ b/crosec/src/commands/fp_mode.rs @@ -1,5 +1,6 @@ +use std::os::fd::AsRawFd; + use bytemuck::{Pod, Zeroable}; -use std::{fs::File, os::fd::AsRawFd}; use strum::IntoEnumIterator; use strum_macros::{EnumIter, EnumString, IntoStaticStr}; @@ -51,7 +52,7 @@ struct EcResponseFpMode { mode: u32, } -pub fn fp_mode(file: &mut File, mode: u32) -> EcCmdResult { +pub fn fp_mode(file: &mut File, mode: u32) -> EcCmdResult { let response: EcResponseFpMode = ec_command_bytemuck( CrosEcCmd::FpMode, 0,