Skip to content

Commit 6a372b2

Browse files
committed
fix test
1 parent 413159c commit 6a372b2

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

tokio-macros/src/lib.rs

+4-19
Original file line numberDiff line numberDiff line change
@@ -251,25 +251,10 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
251251
///
252252
/// ### Configure the runtime to start with time paused
253253
///
254-
/// ```rust
255-
/// #[tokio::main(start_paused = true)]
256-
/// async fn main() {
257-
/// println!("Hello world");
258-
/// }
259-
/// ```
260-
///
261-
/// Equivalent code not using `#[tokio::main]`
262-
///
263-
/// ```rust
264-
/// fn main() {
265-
/// tokio::runtime::Builder::new_current_thread()
266-
/// .enable_all()
267-
/// .start_paused(true)
268-
/// .build()
269-
/// .unwrap()
270-
/// .block_on(async {
271-
/// println!("Hello world");
272-
/// })
254+
/// ```no_run
255+
/// #[tokio::test(start_paused = true)]
256+
/// async fn my_test() {
257+
/// assert!(true);
273258
/// }
274259
/// ```
275260
///

0 commit comments

Comments
 (0)