sync: fix unclosed code block in example (#6056)

This commit is contained in:
Dan Kov 2023-10-06 15:33:26 +03:00 committed by GitHub
parent 6b010ac80f
commit f306bd02c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1325,6 +1325,7 @@ impl<T: Clone> Receiver<T> {
/// let _ = tx.send(10);
/// sync_code.join().unwrap();
/// }
/// ```
pub fn blocking_recv(&mut self) -> Result<T, RecvError> {
crate::future::block_on(self.recv())
}