         queue.async(flags: .barrier) {
             let elements = self.array
             self.array.removeAll()
-            
-            DispatchQueue.main.async {
-                completion?(elements)
-            }
+            DispatchQueue.main.async { completion?(elements) }
         }
     }
 }

        queue.sync { result = self.array.contains(element) }
        return result
    }
}

    }
}

// MARK: - Mutable
public extension SynchronizedArray {

    /// Adds a new element at the end of the array.
