Skip to content

Commit 437abd4

Browse files
committed
Typo
1 parent 91df9aa commit 437abd4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/2978-stack_based_vec.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Of course, fixed buffers lead to some inflexibility because unlike `Vec`, the un
8686
# Reference-level explanation
8787
[reference-level-explanation]: #reference-level-explanation
8888

89-
`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.
89+
`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.
9090

9191
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.
9292

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)