Skip to content

Commit

Permalink
Fix writing empty buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
barafael authored and sajattack committed Jan 12, 2021
1 parent 300f732 commit 9c16bcd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,6 @@ where
type Error = crate::i2c::Error<E>;

fn write(&mut self, addr: u8, output: &[u8]) -> Result<(), Self::Error> {
if output.is_empty() {
return Ok(());
}

// ST
self.i2c_start()?;

Expand Down

0 comments on commit 9c16bcd

Please sign in to comment.