sync: remove rt-core from blocking_{send,recv} (#2825)

This commit is contained in:
Blas Rodriguez Irizar
2020-09-08 20:50:38 -07:00
committed by GitHub
parent ea79c95c67
commit a0a356152e
-4
View File
@@ -184,8 +184,6 @@ impl<T> Receiver<T> {
/// sync_code.join().unwrap()
/// }
/// ```
#[cfg(feature = "rt-core")]
#[cfg_attr(docsrs, doc(cfg(feature = "rt-core")))]
pub fn blocking_recv(&mut self) -> Option<T> {
let mut enter_handle = crate::runtime::enter::enter(false);
enter_handle.block_on(self.recv()).unwrap()
@@ -456,8 +454,6 @@ impl<T> Sender<T> {
/// sync_code.join().unwrap()
/// }
/// ```
#[cfg(feature = "rt-core")]
#[cfg_attr(docsrs, doc(cfg(feature = "rt-core")))]
pub fn blocking_send(&mut self, value: T) -> Result<(), SendError<T>> {
let mut enter_handle = crate::runtime::enter::enter(false);
enter_handle.block_on(self.send(value)).unwrap()