mirror of
https://github.com/Noratrieb/vechonk.git
synced 2026-01-14 16:45:10 +01:00
fixes
This commit is contained in:
parent
e479d5a1c5
commit
5ec62ae0cf
3 changed files with 2 additions and 4 deletions
|
|
@ -104,7 +104,7 @@ pub struct IntoIter<T: ?Sized> {
|
||||||
_marker: PhantomData<T>,
|
_marker: PhantomData<T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T: ?Sized> IntoIter<T> {
|
impl<T: ?Sized> IntoIter<T> {
|
||||||
pub(crate) fn from_raw(raw: RawVechonk<T>) -> Self {
|
pub(crate) fn from_raw(raw: RawVechonk<T>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
raw,
|
raw,
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ impl<T: ?Sized> Vechonk<T> {
|
||||||
Iter::new(self)
|
Iter::new(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An iterator over the elements yielding [`MutGuard`]s
|
/// An iterator over the elements yielding [`&mut T`]s
|
||||||
pub fn iter_mut(&mut self) -> IterMut<T> {
|
pub fn iter_mut(&mut self) -> IterMut<T> {
|
||||||
IterMut::new(self)
|
IterMut::new(self)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ fn default() {
|
||||||
assert_eq!(chonk.len(), 0);
|
assert_eq!(chonk.len(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn zero_capacity() {
|
fn zero_capacity() {
|
||||||
let chonk = Vechonk::<()>::with_capacity(0);
|
let chonk = Vechonk::<()>::with_capacity(0);
|
||||||
|
|
@ -437,7 +436,6 @@ fn index_mut() {
|
||||||
assert_eq!(chonk[2].value(), 2);
|
assert_eq!(chonk[2].value(), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic]
|
#[should_panic]
|
||||||
fn index_mut_out_of_bounds() {
|
fn index_mut_out_of_bounds() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue