From 0b1f640308d9ac4b9446e5523982eef0527b5bdf Mon Sep 17 00:00:00 2001 From: Hayden Stainsby Date: Fri, 9 Sep 2022 20:36:42 +0200 Subject: [PATCH] io: remove reference to missing functions from `Registration` docs (#4995) The docs for `Registration::new_with_interest_and_handle` (internal function) included a reference to two old functions `new_with_interest` and `new` on the same struct. These functions no longer exist, which could be confusing. Since there is currently only a single constructor function on `Registration`, the misleading text has simply been removed. --- tokio/src/runtime/io/registration.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tokio/src/runtime/io/registration.rs b/tokio/src/runtime/io/registration.rs index a82eaee46..7b823460a 100644 --- a/tokio/src/runtime/io/registration.rs +++ b/tokio/src/runtime/io/registration.rs @@ -57,10 +57,8 @@ unsafe impl Sync for Registration {} // ===== impl Registration ===== impl Registration { - /// Registers the I/O resource with the default reactor, for a specific - /// `Interest`. `new_with_interest` should be used over `new` when you need - /// control over the readiness state, such as when a file descriptor only - /// allows reads. This does not add `hup` or `error` so if you are + /// Registers the I/O resource with the reactor for the provided handle, for + /// a specific `Interest`. This does not add `hup` or `error` so if you are /// interested in those states, you will need to add them to the readiness /// state passed to this function. ///