Skip to content

Commit b61a1bd

Browse files
committed
clippy
1 parent 3e19c20 commit b61a1bd

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/async_/resolver.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,11 @@ impl Resolver {
130130
self.resolver.as_ptr(),
131131
core::ptr::null_mut(),
132132
))
133-
.ok_or_else(|| Error::AllocationFailed)?
133+
.ok_or(Error::AllocationFailed)?
134134
};
135135

136136
let mut resolver = Resolution::new(name, pool, self.timeout, ctx)?;
137137
resolver.as_mut().await
138-
// FIXME how does timeout get caught??
139-
/*
140-
resolver
141-
.await
142-
.map_err(|_| Error::Resolver(ResolverError::TimedOut, name.to_string()))?
143-
*/
144138
}
145139
}
146140

@@ -192,9 +186,8 @@ impl<'a> Resolution<'a> {
192186
this.complete = Some(Self::resolve_result(ctx, this.pool));
193187
this.ctx.take();
194188
if let Some(waker) = this.waker.take() {
195-
// Ensure &mut Resolution no longer exists when wake resumes
196-
// suspended Future of Pin<&mut Resolution>
197-
let _ = this;
189+
// Wake last, after all use of &mut Resolution, because wake may
190+
// poll Resolution future on current stack.
198191
waker.wake();
199192
}
200193
}

0 commit comments

Comments
 (0)