vec: use field init shorthand notation

pull/415/head
Eva Pace 2 years ago
parent 6723302995
commit 2e52fe8f71

@ -93,7 +93,7 @@ impl<T> IntoIterator for Vec<T> {
mem::forget(self);
IntoIter {
iter: iter,
iter,
_buf: buf,
}
}
@ -144,7 +144,7 @@ impl<T> Vec<T> {
self.len = 0;
Drain {
iter: iter,
iter,
vec: PhantomData,
}
}

@ -166,7 +166,7 @@ impl<T> Vec<T> {
self.len = 0;
Drain {
iter: iter,
iter,
vec: PhantomData,
}
}
@ -203,7 +203,7 @@ impl<T> IntoIterator for Vec<T> {
mem::forget(self);
IntoIter {
iter: iter,
iter,
_buf: buf,
}
}

@ -71,7 +71,7 @@ impl<T> IntoIterator for Vec<T> {
unsafe {
IntoIter {
buf: ptr,
cap: cap,
cap,
start: ptr.as_ptr(),
end: if cap == 0 {
// can't offset off this pointer, it's not allocated!

Loading…
Cancel
Save