Skip to content

Commit 54e96cd

Browse files
committed
renamed dropFirst and dropLast to popFirst and popLast
1 parent 024d4e8 commit 54e96cd

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Sources/SwiftRoaring/RoaringBitmap.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ public final class RoaringBitmap: Sequence, Equatable, CustomStringConvertible,
884884
}
885885

886886
@inlinable @inline(__always)
887-
public func dropFirst() -> UInt32? {
887+
public func popFirst() -> UInt32? {
888888
guard let first = self.first else { return nil }
889889
self.remove(first)
890890
return first
@@ -906,7 +906,7 @@ public final class RoaringBitmap: Sequence, Equatable, CustomStringConvertible,
906906
}
907907

908908
@inlinable @inline(__always)
909-
public func dropLast() -> UInt32? {
909+
public func popLast() -> UInt32? {
910910
guard let last = self.last else { return nil }
911911
self.remove(last)
912912
return last

Tests/swiftRoaringTests/swiftRoaringTests.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,10 @@ class swiftRoaringTests: XCTestCase {
361361
let b: RoaringBitmap = [1, 2, 3]
362362

363363
XCTAssert(b.first == 1)
364-
XCTAssert(b.dropFirst() == 1)
365-
XCTAssert(b.dropFirst() == 2)
366-
XCTAssert(b.dropFirst() == 3)
367-
XCTAssert(b.dropFirst() == nil)
364+
XCTAssert(b.popFirst() == 1)
365+
XCTAssert(b.popFirst() == 2)
366+
XCTAssert(b.popFirst() == 3)
367+
XCTAssert(b.popFirst() == nil)
368368
XCTAssert(b.first == nil)
369369
XCTAssert(b.isEmpty)
370370
}
@@ -375,10 +375,10 @@ class swiftRoaringTests: XCTestCase {
375375

376376
let b: RoaringBitmap = [1, 2, 3]
377377
XCTAssert(b.last == 3)
378-
XCTAssert(b.dropLast() == 3)
379-
XCTAssert(b.dropLast() == 2)
380-
XCTAssert(b.dropLast() == 1)
381-
XCTAssert(b.dropLast() == nil)
378+
XCTAssert(b.popLast() == 3)
379+
XCTAssert(b.popLast() == 2)
380+
XCTAssert(b.popLast() == 1)
381+
XCTAssert(b.popLast() == nil)
382382
XCTAssert(b.last == nil)
383383
XCTAssert(b.isEmpty)
384384
}

0 commit comments

Comments
 (0)