@@ -106,7 +106,7 @@ impl<const N: usize> Responder<N> {
106106 & mut self ,
107107 mut comm : R ,
108108 req : & PldmRequest < ' _ > ,
109- host : & mut impl Host ,
109+ _host : & mut impl Host ,
110110 ) -> pldm:: Result < ( ) > {
111111 if req. typ != PLDM_TYPE_FILE_TRANSFER {
112112 trace ! ( "pldm-fw non-pldm-fw request {req:?}" ) ;
@@ -125,9 +125,9 @@ impl<const N: usize> Responder<N> {
125125 } ;
126126
127127 let r = match cmd {
128- Cmd :: DfProperties => self . cmd_dfproperties ( req, host ) ,
129- Cmd :: DfOpen => self . cmd_dfopen ( req, host ) ,
130- Cmd :: DfClose => self . cmd_dfclose ( req, host ) ,
128+ Cmd :: DfProperties => self . cmd_dfproperties ( req) ,
129+ Cmd :: DfOpen => self . cmd_dfopen ( req) ,
130+ Cmd :: DfClose => self . cmd_dfclose ( req) ,
131131 _ => {
132132 trace ! ( "unhandled command {cmd:?}" ) ;
133133 Err ( CCode :: ERROR_UNSUPPORTED_PLDM_CMD . into ( ) )
@@ -207,7 +207,6 @@ impl<const N: usize> Responder<N> {
207207 fn cmd_dfproperties < ' a > (
208208 & mut self ,
209209 req : & ' a PldmRequest < ' a > ,
210- _host : & mut impl Host ,
211210 ) -> Result < PldmResponse < ' a > > {
212211 let ( rest, dfp) = DfPropertiesReq :: from_bytes ( ( & req. data , 0 ) ) ?;
213212
@@ -234,7 +233,6 @@ impl<const N: usize> Responder<N> {
234233 fn cmd_dfopen < ' a > (
235234 & mut self ,
236235 req : & ' a PldmRequest < ' a > ,
237- _host : & mut impl Host ,
238236 ) -> Result < PldmResponse < ' a > > {
239237 let ( rest, dfo) = DfOpenReq :: from_bytes ( ( & req. data , 0 ) ) ?;
240238
@@ -254,8 +252,7 @@ impl<const N: usize> Responder<N> {
254252 let id = self
255253 . files
256254 . iter ( )
257- . enumerate ( )
258- . find_map ( |( n, e) | if e. is_none ( ) { Some ( n) } else { None } )
255+ . position ( |e| e. is_none ( ) )
259256 . ok_or ( file_ccode:: MAX_NUM_FDS_EXCEEDED ) ?;
260257
261258 self . files [ id] . replace ( file_ctx) ;
@@ -273,7 +270,6 @@ impl<const N: usize> Responder<N> {
273270 fn cmd_dfclose < ' a > (
274271 & mut self ,
275272 req : & ' a PldmRequest < ' a > ,
276- _host : & mut impl Host ,
277273 ) -> Result < PldmResponse < ' a > > {
278274 let ( rest, dfc) = DfCloseReq :: from_bytes ( ( & req. data , 0 ) ) ?;
279275
0 commit comments