Skip to content

Commit

Permalink
Clean up dbg residue from clamping timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
sirhcel authored and eldruin committed Sep 19, 2024
1 parent 5d10e6d commit 23b80b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions src/posix/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ fn wait_fd(fd: RawFd, events: PollFlags, timeout: Duration) -> io::Result<()> {

let wait = match poll_clamped(&mut fd, timeout) {
Ok(r) => r,
Err(e) => {
dbg!(e);
return Err(io::Error::from(crate::Error::from(e)));
}
Err(e) => return Err(io::Error::from(crate::Error::from(e))),
};
// All errors generated by poll or ppoll are already caught by the nix wrapper around libc, so
// here we only need to check if there's at least 1 event
Expand Down Expand Up @@ -116,7 +113,6 @@ mod tests {

for (i, d) in MONOTONIC_DURATIONS.iter().enumerate() {
let next = clamped_millis_c_int(*d);
dbg!((i, d));
assert!(
next >= last,
"{next} >= {last} failed for {d:?} at index {i}"
Expand All @@ -136,7 +132,6 @@ mod tests {

for (i, d) in MONOTONIC_DURATIONS.iter().enumerate() {
let next = clamped_time_spec(*d);
dbg!((i, d));
assert!(
next >= last,
"{next} >= {last} failed for {d:?} at index {i}"
Expand Down
1 change: 0 additions & 1 deletion src/windows/com.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ mod tests {

for (i, d) in MONOTONIC_DURATIONS.iter().enumerate() {
let next = COMPort::timeout_constant(*d);
dbg!((i, d));
assert!(
next >= last,
"{next} >= {last} failed for {d:?} at index {i}"
Expand Down

0 comments on commit 23b80b3

Please sign in to comment.