File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ pub static RUNTIME: Lazy<Runtime> = Lazy::new(|| {
2222 . unwrap_or_else ( |_| num_cpus:: get ( ) )
2323 . max ( 1 ) ;
2424
25- let thread_name = env:: var ( "ASYNC_STD_THREAD_NAME" ) . unwrap_or ( "async-std/runtime" . to_string ( ) ) ;
25+ let thread_name =
26+ env:: var ( "ASYNC_STD_THREAD_NAME" ) . unwrap_or_else ( |_| "async-std/runtime" . to_string ( ) ) ;
2627
2728 for _ in 0 ..thread_count {
2829 thread:: Builder :: new ( )
Original file line number Diff line number Diff line change 4141 let mut this = self . project ( ) ;
4242 let next = futures_core:: ready!( this. stream. as_mut( ) . poll_next( cx) ) ;
4343
44- Poll :: Ready ( next. and_then ( |x| {
44+ Poll :: Ready ( next. map ( |x| {
4545 ( this. f ) ( & x) ;
46- Some ( x )
46+ x
4747 } ) )
4848 }
4949}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ impl Builder {
4141 #[ cfg( not( target_os = "unknown" ) ) ]
4242 once_cell:: sync:: Lazy :: force ( & crate :: rt:: RUNTIME ) ;
4343
44- let tag = TaskLocalsWrapper :: new ( task. clone ( ) ) ;
44+ let tag = TaskLocalsWrapper :: new ( task) ;
4545
4646 SupportTaskLocals { tag, future }
4747 }
You can’t perform that action at this time.
0 commit comments