mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-20 00:00:08 +02:00
Make poll_at private again
Unsure that we'll want to continue to expose this, stick to being conservative for now.
This commit is contained in:
@@ -68,7 +68,7 @@ impl Interval {
|
||||
/// otherwise functions as this future's `poll` function. This will block a
|
||||
/// task if one isn't already blocked or update a previous one if already
|
||||
/// blocked.
|
||||
pub fn poll_at(&mut self, now: Instant) -> Poll<Option<()>, io::Error> {
|
||||
fn poll_at(&mut self, now: Instant) -> Poll<Option<()>, io::Error> {
|
||||
if self.next <= now {
|
||||
self.next = next_interval(self.next, now, self.interval);
|
||||
self.token.reset_timeout(self.next, &self.handle);
|
||||
|
||||
@@ -77,7 +77,7 @@ impl Timeout {
|
||||
/// otherwise functions as this future's `poll` function. This will block a
|
||||
/// task if one isn't already blocked or update a previous one if already
|
||||
/// blocked.
|
||||
pub fn poll_at(&mut self, now: Instant) -> Poll<(), io::Error> {
|
||||
fn poll_at(&mut self, now: Instant) -> Poll<(), io::Error> {
|
||||
if self.when <= now {
|
||||
Ok(Async::Ready(()))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user