@@ -204,7 +204,7 @@ pub trait PollCommand {
204204 /// Re-write the provided slice starting from index 0. This command
205205 /// is called by read_input() which will provide a sub-slice of the
206206 /// controller's command bytes.
207- fn set_command ( & self , & mut [ u8 ] ) ;
207+ fn set_command ( & self , _ : & mut [ u8 ] ) ;
208208}
209209
210210/// Many controllers have the same set of buttons (Square, Circle, L3, R1, etc).
@@ -416,7 +416,7 @@ where
416416 Ok ( config)
417417 }
418418
419- fn read_port ( & mut self , command : Option < & PollCommand > ) -> Result < [ u8 ; MESSAGE_MAX_LENGTH ] , Error < E > > {
419+ fn read_port ( & mut self , command : Option < & dyn PollCommand > ) -> Result < [ u8 ; MESSAGE_MAX_LENGTH ] , Error < E > > {
420420 let mut buffer = [ 0u8 ; MESSAGE_MAX_LENGTH ] ;
421421 let mut data = [ 0u8 ; MESSAGE_MAX_LENGTH ] ;
422422
@@ -448,7 +448,7 @@ where
448448 /// Get the raw data from polling for a controller. You can use this to cooerce the data into
449449 /// some controller that can't be safely identified by `read_input`, but you should rely on that
450450 /// function if you can.
451- pub fn read_raw ( & mut self , command : Option < & PollCommand > ) -> Result < ControllerData , Error < E > > {
451+ pub fn read_raw ( & mut self , command : Option < & dyn PollCommand > ) -> Result < ControllerData , Error < E > > {
452452 let mut buffer = [ 0u8 ; MESSAGE_MAX_LENGTH ] ;
453453 let data = self . read_port ( command) ?;
454454
@@ -463,7 +463,7 @@ where
463463
464464 /// Ask the controller for input states. Different contoller types will be returned automatically
465465 /// for you. If you'd like to cooerce a controller yourself, use `read_raw`.
466- pub fn read_input ( & mut self , command : Option < & PollCommand > ) -> Result < Device , Error < E > > {
466+ pub fn read_input ( & mut self , command : Option < & dyn PollCommand > ) -> Result < Device , Error < E > > {
467467 let mut buffer = [ 0u8 ; MESSAGE_MAX_LENGTH ] ;
468468 let data = self . read_port ( command) ?;
469469
0 commit comments