mirror of
https://github.com/zhigang1992/SwiftParsec.git
synced 2026-04-28 17:25:57 +08:00
Remove unused popFirst() method
The method has been implemented in the standard library.
This commit is contained in:
@@ -8,18 +8,6 @@
|
||||
|
||||
public extension RangeReplaceableCollection {
|
||||
|
||||
/// If `!self.isEmpty`, remove the first element and return it, otherwise
|
||||
/// return `nil`.
|
||||
///
|
||||
/// - returns: The fhe first element of `self` or `nil`.
|
||||
public mutating func popFirst() -> Iterator.Element? {
|
||||
|
||||
guard !isEmpty else { return nil }
|
||||
|
||||
return removeFirst()
|
||||
|
||||
}
|
||||
|
||||
/// Prepend `newElement` to the collection.
|
||||
///
|
||||
/// - parameter newElement: New element to prepend to the collection.
|
||||
|
||||
Reference in New Issue
Block a user