@@ -23,29 +23,6 @@ use std::marker::PhantomData;
23
23
use std:: ops:: { Deref , DerefMut } ;
24
24
use crate :: owning_ref:: { Erased , OwningRef } ;
25
25
26
- pub fn serial_join < A , B , RA , RB > ( oper_a : A , oper_b : B ) -> ( RA , RB )
27
- where A : FnOnce ( ) -> RA ,
28
- B : FnOnce ( ) -> RB
29
- {
30
- ( oper_a ( ) , oper_b ( ) )
31
- }
32
-
33
- pub struct SerialScope ;
34
-
35
- impl SerialScope {
36
- pub fn spawn < F > ( & self , f : F )
37
- where F : FnOnce ( & SerialScope )
38
- {
39
- f ( self )
40
- }
41
- }
42
-
43
- pub fn serial_scope < F , R > ( f : F ) -> R
44
- where F : FnOnce ( & SerialScope ) -> R
45
- {
46
- f ( & SerialScope )
47
- }
48
-
49
26
pub use std:: sync:: atomic:: Ordering :: SeqCst ;
50
27
pub use std:: sync:: atomic:: Ordering ;
51
28
@@ -64,6 +41,29 @@ cfg_if! {
64
41
}
65
42
}
66
43
44
+ pub fn serial_join<A , B , RA , RB >( oper_a: A , oper_b: B ) -> ( RA , RB )
45
+ where A : FnOnce ( ) -> RA ,
46
+ B : FnOnce ( ) -> RB
47
+ {
48
+ ( oper_a( ) , oper_b( ) )
49
+ }
50
+
51
+ pub struct SerialScope ;
52
+
53
+ impl SerialScope {
54
+ pub fn spawn<F >( & self , f: F )
55
+ where F : FnOnce ( & SerialScope )
56
+ {
57
+ f( self )
58
+ }
59
+ }
60
+
61
+ pub fn serial_scope<F , R >( f: F ) -> R
62
+ where F : FnOnce ( & SerialScope ) -> R
63
+ {
64
+ f( & SerialScope )
65
+ }
66
+
67
67
use std:: ops:: Add ;
68
68
use std:: panic:: { resume_unwind, catch_unwind, AssertUnwindSafe } ;
69
69
0 commit comments