Skip to content

Commit

Permalink
fix doc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ipetkov committed Jul 11, 2022
1 parent ff10e49 commit f77957d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tokio/src/task/builder.rs
Expand Up @@ -48,7 +48,7 @@ use std::{future::Future, io};
/// .spawn(async move {
/// // Process each socket concurrently.
/// process(socket).await
/// });
/// })?;
/// }
/// }
/// ```
Expand Down
4 changes: 2 additions & 2 deletions tokio/src/task/join_set.rs
Expand Up @@ -101,13 +101,13 @@ impl<T: 'static> JoinSet<T> {
/// use tokio::task::JoinSet;
///
/// #[tokio::main]
/// async fn main() {
/// async fn main() -> io::Result<()> {
/// let mut set = JoinSet::new();
///
/// // Use the builder to configure a task's name before spawning it.
/// set.build_task()
/// .name("my_task")
/// .spawn(async { /* ... */ });
/// .spawn(async { /* ... */ })?;
/// }
/// ```
#[cfg(all(tokio_unstable, feature = "tracing"))]
Expand Down

0 comments on commit f77957d

Please sign in to comment.