-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
io: remove redundant check #6966
Conversation
That seems really fragile. I would say that keeping the unpacking is better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, thanks! Just one more nit:
Co-authored-by: Alice Ryhl <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Bumps tokio from 1.41.1 to 1.42.0. Release notes Sourced from tokio's releases. Tokio v1.42.0 1.42.0 (Dec 3rd, 2024) Added io: add AsyncFd::{try_io, try_io_mut} (#6967) Fixed io: avoid ptr->ref->ptr roundtrip in RegistrationSet (#6929) runtime: do not defer yield_now inside block_in_place (#6999) Changes io: simplify io readiness logic (#6966) Documented net: fix docs for tokio::net::unix::{pid_t, gid_t, uid_t} (#6791) time: fix a typo in Instant docs (#6982) #6791: tokio-rs/tokio#6791 #6929: tokio-rs/tokio#6929 #6966: tokio-rs/tokio#6966 #6967: tokio-rs/tokio#6967 #6982: tokio-rs/tokio#6982 #6999: tokio-rs/tokio#6999 Commits bb9d570 chore: prepare Tokio v1.42.0 (#7005) af9c683 tests: fix typo in build test instructions (#7004) 4bc5a1a ci: allow Unicode-3.0 license for unicode-ident (#7006) f8948ea runtime: do not defer yield_now inside block_in_place (#6999) bce9780 time: use array::from_fn instead of manually creating array (#7000) 38151f3 readme: unlist 1.32.x as LTS release (#6997) 5dda72d ci: pin valgrind to rustc 1.82 (#6998) c07257f io: simplify io readiness logic (#6966) d08578f time: fix a typo in Instant docs (#6982) 4047d79 miri: add annotations for tests with miri ignore (#6981) Additional commits viewable in compare view Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: @dependabot rebase will rebase this PR @dependabot recreate will recreate this PR, overwriting any edits that have been made to it @dependabot merge will merge this PR after your CI passes on it @dependabot squash and merge will squash and merge this PR after your CI passes on it @dependabot cancel merge will cancel a previously requested merge and block automerging @dependabot reopen will reopen this PR if it is closed @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Removes a redundant checks:
1. No need to unpackreadiness
, Since readiness is already positioned at the least significant portion, AndReady::from_usize
performs internal masking2. Remove
if !existing.will_wake { .. }
, Sincewaker.clone_from
already performs this optimization internally.3. Updated
fn set_readiness()
, to skip calling the closuref(..)
when possible.