Skip to content

Commit

Permalink
Elide unnecessary explicit lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
richardeoin committed Jul 1, 2023
1 parent ca203f3 commit e5dc056
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,9 +1170,7 @@ macro_rules! spi {
}

/// Internal implementation for blocking::spi::Write
fn transfer_internal_w<'w>(&mut self,
write_words: &'w [$TY],
) -> Result<(), Error> {
fn transfer_internal_w(&mut self, write_words: &[$TY]) -> Result<(), Error> {
use hal::spi::FullDuplex;

// both buffers are the same length
Expand Down Expand Up @@ -1230,9 +1228,7 @@ macro_rules! spi {
}

/// Internal implementation for blocking::spi::Transfer
fn transfer_internal_rw<'w>(&mut self,
words : &'w mut [$TY]
) -> Result<(), Error> {
fn transfer_internal_rw(&mut self, words : &mut [$TY]) -> Result<(), Error> {
use hal::spi::FullDuplex;

if words.is_empty() {
Expand Down

0 comments on commit e5dc056

Please sign in to comment.