@@ -80,24 +80,22 @@ impl AsyncLog {
80
80
81
81
///
82
82
pub fn fetch ( & mut self ) -> Result < ( ) > {
83
- if !self . is_pending ( ) {
84
- if self . head_changed ( ) ? {
85
- self . clear ( ) ?;
86
-
87
- let arc_current = Arc :: clone ( & self . current ) ;
88
- let sender = self . sender . clone ( ) ;
89
- let arc_pending = Arc :: clone ( & self . pending ) ;
90
-
91
- rayon_core:: spawn ( move || {
92
- scope_time ! ( "async::revlog" ) ;
93
-
94
- arc_pending. store ( true , Ordering :: Relaxed ) ;
95
- AsyncLog :: fetch_helper ( arc_current, & sender)
96
- . expect ( "failed to fetch" ) ;
97
- arc_pending. store ( false , Ordering :: Relaxed ) ;
98
- Self :: notify ( & sender) ;
99
- } ) ;
100
- }
83
+ if !self . is_pending ( ) && self . head_changed ( ) ? {
84
+ self . clear ( ) ?;
85
+
86
+ let arc_current = Arc :: clone ( & self . current ) ;
87
+ let sender = self . sender . clone ( ) ;
88
+ let arc_pending = Arc :: clone ( & self . pending ) ;
89
+
90
+ rayon_core:: spawn ( move || {
91
+ scope_time ! ( "async::revlog" ) ;
92
+
93
+ arc_pending. store ( true , Ordering :: Relaxed ) ;
94
+ AsyncLog :: fetch_helper ( arc_current, & sender)
95
+ . expect ( "failed to fetch" ) ;
96
+ arc_pending. store ( false , Ordering :: Relaxed ) ;
97
+ Self :: notify ( & sender) ;
98
+ } ) ;
101
99
}
102
100
Ok ( ( ) )
103
101
}
0 commit comments