1- use std:: cell:: Cell ;
21use std:: future:: Future ;
32use std:: pin:: Pin ;
43use std:: sync:: Arc ;
@@ -7,7 +6,7 @@ use std::task::{Context, Poll};
76use pin_project_lite:: pin_project;
87
98use crate :: io;
10- use crate :: task:: { self , JoinHandle , Task , TaskLocalsWrapper } ;
9+ use crate :: task:: { JoinHandle , Task , TaskLocalsWrapper } ;
1110
1211/// Task builder that configures the settings of a new task.
1312#[ derive( Debug , Default ) ]
@@ -61,7 +60,7 @@ impl Builder {
6160 } ) ;
6261
6362 let task = wrapped. tag . task ( ) . clone ( ) ;
64- let handle = task:: executor:: spawn ( wrapped) ;
63+ let handle = crate :: task:: executor:: spawn ( wrapped) ;
6564
6665 Ok ( JoinHandle :: new ( handle, task) )
6766 }
@@ -81,7 +80,7 @@ impl Builder {
8180 } ) ;
8281
8382 let task = wrapped. tag . task ( ) . clone ( ) ;
84- let handle = task:: executor:: local ( wrapped) ;
83+ let handle = crate :: task:: executor:: local ( wrapped) ;
8584
8685 Ok ( JoinHandle :: new ( handle, task) )
8786 }
@@ -143,6 +142,8 @@ impl Builder {
143142 where
144143 F : Future < Output = T > ,
145144 {
145+ use std:: cell:: Cell ;
146+
146147 let wrapped = self . build ( future) ;
147148
148149 // Log this `block_on` operation.
@@ -167,7 +168,7 @@ impl Builder {
167168 TaskLocalsWrapper :: set_current ( & wrapped. tag , || {
168169 let res = if should_run {
169170 // The first call should run the executor
170- task:: executor:: run ( wrapped)
171+ crate :: task:: executor:: run ( wrapped)
171172 } else {
172173 futures_lite:: future:: block_on ( wrapped)
173174 } ;
0 commit comments