Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(simple): timeout usage #17

Merged
merged 1 commit into from
Jan 31, 2024
Merged

fix(simple): timeout usage #17

merged 1 commit into from
Jan 31, 2024

Conversation

t3hmrman
Copy link
Owner

The previous implementation of timeouts for dropping had a bug -- the timeout value was saved after calling std::mem::take, and was referring to the new T::default() instance's value of timeout, which is always None.

This commit fixes the timeout usage by taking the timeout value before std::mem::take.

The previous implementation of timeouts for dropping had a bug -- the
timeout value was saved *after* calling `std::mem::take`, and was
referring to the new `T::default()` instance's value of `timeout`,
which is always `None`.

This commit fixes the timeout usage by taking the timeout value before
`std::mem::take`.

Co-authored-by: Linken Quy Dinh <[email protected]>
@t3hmrman t3hmrman force-pushed the fix/simple/timeout-usage branch from 890767c to d32688c Compare January 31, 2024 07:33
@t3hmrman t3hmrman merged commit 52ab208 into main Jan 31, 2024
2 checks passed
@t3hmrman t3hmrman deleted the fix/simple/timeout-usage branch January 31, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant