Skip to content

Commit

Permalink
Syntax fix for older rust version. Fix empty parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
xoac committed Sep 15, 2019
1 parent 83b1b62 commit e1cd346
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions serial-windows/src/com.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,25 +162,25 @@ impl io::Read for COMPort {
}
}

impl io::Read for &COMPort {
impl<'a> io::Read for &'a COMPort {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
self.read_impl()
self.read_impl(buf)
}
}

impl io::Write for COMPort {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.write_impl()
self.write_impl(buf)
}

fn flush(&mut self) -> io::Result<()> {
self.flush_impl()
}
}

impl io::Write for &COMPort {
impl<'a> io::Write for &'a COMPort {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.write_impl()
self.write_impl(buf)
}

fn flush(&mut self) -> io::Result<()> {
Expand Down

0 comments on commit e1cd346

Please sign in to comment.