Skip to content

Commit

Permalink
Fix bug introduced with serialport#39
Browse files Browse the repository at this point in the history
If opening succeeded, automatic closing on drop must be skipped
  • Loading branch information
jannic committed Mar 18, 2022
1 parent 5992905 commit 66df991
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/posix/tty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ impl Drop for OwnedFd {

impl OwnedFd {
fn into_raw(self) -> RawFd {
self.0
let fd = self.0;
mem::forget(self);
fd
}
}

Expand Down

0 comments on commit 66df991

Please sign in to comment.