         self.count += 1
     }
 
+    @discardableResult
     internal func popLast() -> Element? {
         guard count > 0 else { return nil }
         let lastIndex = bufferIndex(forDequeIndex: count - 1)

    /// Remove the element at a given index from this deque.
    ///
    /// - Complexity: O(`count`). Note though that complexity is O(1) if `index` is of a constant distance from the front or end of the deque.
    public mutating func remove(at index: Int) -> Element {
        checkSubscript(index)
        makeUnique()

        self.count += 1
    }

    @discardableResult
    internal func popFirst() -> Element? {
        guard count > 0 else { return nil }
        let first = elements.advanced(by: start).move()
