Skip to content

Commit

Permalink
Fix docs of Dequeue::back
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 authored and chipshort committed Nov 13, 2023
1 parent ed963dc commit bd30762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl<'a, T: Serialize + DeserializeOwned> Deque<'a, T> {
self.get_unchecked(storage, pos)
}

/// Returns the first element of the deque without removing it
/// Returns the last element of the deque without removing it
pub fn back(&self, storage: &dyn Storage) -> StdResult<Option<T>> {
let pos = self.tail(storage)?.wrapping_sub(1);
self.get_unchecked(storage, pos)
Expand Down

0 comments on commit bd30762

Please sign in to comment.