File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ pub struct Bounded<T> {
49
49
/// If this bit is set in the tail, that means the queue is closed.
50
50
mark_bit : usize ,
51
51
52
- /// Indicates that dropping an `Bounded<T>` may drop values of type `T`.
52
+ /// Indicates that dropping a `Bounded<T>` may drop values of type `T`.
53
53
_marker : PhantomData < T > ,
54
54
}
55
55
@@ -288,12 +288,7 @@ impl<T> Bounded<T> {
288
288
/// Returns `true` if this call closed the queue.
289
289
pub fn close ( & self ) -> bool {
290
290
let tail = self . tail . fetch_or ( self . mark_bit , Ordering :: SeqCst ) ;
291
-
292
- if tail & self . mark_bit == 0 {
293
- true
294
- } else {
295
- false
296
- }
291
+ tail & self . mark_bit == 0
297
292
}
298
293
299
294
/// Returns `true` if the queue is closed.
Original file line number Diff line number Diff line change @@ -365,12 +365,7 @@ impl<T> Unbounded<T> {
365
365
/// Returns `true` if this call closed the queue.
366
366
pub fn close ( & self ) -> bool {
367
367
let tail = self . tail . index . fetch_or ( MARK_BIT , Ordering :: SeqCst ) ;
368
-
369
- if tail & MARK_BIT == 0 {
370
- true
371
- } else {
372
- false
373
- }
368
+ tail & MARK_BIT == 0
374
369
}
375
370
376
371
/// Returns `true` if the queue is closed.
You can’t perform that action at this time.
0 commit comments