mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
chore: deny warnings for doc tests (#1539)
This commit is contained in:
@@ -149,7 +149,7 @@ impl dyn Executor {
|
||||
/// println!("running on the executor");
|
||||
/// })).unwrap();
|
||||
///
|
||||
/// handle.map(|_| println!("the future has completed"));
|
||||
/// let handle = handle.map(|_| println!("the future has completed"));
|
||||
/// # }
|
||||
/// ```
|
||||
pub fn spawn_with_handle<Fut>(
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
unreachable_pub
|
||||
)]
|
||||
#![deny(intra_doc_link_resolution_failure)]
|
||||
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
||||
#![doc(test(
|
||||
no_crate_inject,
|
||||
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
||||
))]
|
||||
|
||||
//! Task execution related traits and utilities.
|
||||
//!
|
||||
|
||||
@@ -104,7 +104,7 @@ pub struct BlockingError {
|
||||
/// // from the context of a `Future` implementation. Since we don't
|
||||
/// // have a complicated requirement, we can use `poll_fn` in this
|
||||
/// // case.
|
||||
/// poll_fn(move |_| {
|
||||
/// let _ = poll_fn(move |_| {
|
||||
/// blocking(|| {
|
||||
/// let msg = rx.recv().unwrap();
|
||||
/// println!("message = {}", msg);
|
||||
|
||||
@@ -63,7 +63,7 @@ use crate::SpawnError;
|
||||
/// if item.is_none() { break; }
|
||||
/// }
|
||||
///
|
||||
/// self.tx.take().unwrap().send(()).map_err(|_| ());
|
||||
/// let _ = self.tx.take().unwrap().send(()).map_err(|_| ());
|
||||
/// Poll::Ready(())
|
||||
/// }
|
||||
/// }
|
||||
|
||||
Reference in New Issue
Block a user