Correct reverting the addition of try_wait
Remove try_wait, but keep is_done. The function signature for try_wait
was buggily useless for all practical purposes.
@@ -693,20 +693,6 @@ impl<B> Transfer<B> {
}
}
- /// Attempts to return the buffer if the transfer is done.
- pub fn try_wait(mut self) -> Option<(B, I2S)> {
- if self.is_done() {
- let inner = self
- .inner
- .take()
- .unwrap_or_else(|| unsafe { core::hint::unreachable_unchecked() });
- compiler_fence(Ordering::Acquire);
- Some((inner.buffer, inner.i2s))
- } else {
- None
- }
- }
-
/// Blocks until the transfer is done and returns the buffer.
pub fn wait(mut self) -> (B, I2S) {
while !self.is_done() {}
