Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
c410-f3r committed Sep 28, 2020
1 parent 91df9aa commit 437abd4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions text/2978-stack_based_vec.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Of course, fixed buffers lead to some inflexibility because unlike `Vec`, the un
# Reference-level explanation
[reference-level-explanation]: #reference-level-explanation

`ArrayVec` is a contiguous memory block where elements can be collected, threfore, a collection by definition and even though `core::collections` doesn't exist, it is the most natural modulo placement.
`ArrayVec` is a contiguous memory block where elements can be collected, threfore, a collection by definition and even though `core::collections` doesn't exist, it is the most natural module placement.

The API basically mimics most of the current `Vec` surface with some tweaks and additional methods to manage capacity. Notably, these additional methods are fallible versions of some well-known functions like `insert` that will return `Result` instead of panicking at run-time.

Expand Down Expand Up @@ -190,13 +190,13 @@ impl<T, const N: usize> ArrayVec<T, N> {

pub fn try_insert(&mut self, _idx: usize, element: T) -> Result<(), ArrayVecError>;

pub fn try_pop(&mut self) -> Result<(), ArrayVecError>;
pub fn try_pop(&mut self) -> Result<T, ArrayVecError>;

pub fn try_push(&mut self, element: T) -> Result<(), ArrayVecError>;

pub fn try_remove(&mut self, idx: usize) -> Result<(), ArrayVecError>;
pub fn try_remove(&mut self, idx: usize) -> Result<T, ArrayVecError>;

pub fn try_swap_remove(&mut self, idx: usize) -> Result<(), ArrayVecError>;
pub fn try_swap_remove(&mut self, idx: usize) -> Result<T, ArrayVecError>;
}

#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)]
Expand Down

0 comments on commit 437abd4

Please sign in to comment.