general clean-up, plus fix to ensure an event after read if data is still pending
Change was motivated by read event getting locked out in raw mode.
- The fix for that was to clear the flag indicating "event not needed" whenever a read occurs. The "Resource" trait was modified to have
&mut self
forread
andwrite
, as those operations should expect side effects. - A separate bug was identified where the
timeout_count
(sequence identifier) was not being updated. - PtyMaster and PtySlave were changed to PtyControlTerm and PtySubTerm
- Code was reformatted, updated to 2021 edition, and warnings were corrected.