Fixed extra cases found in better checking.
This commit is contained in:
parent
8e4c9e4e9d
commit
c623375326
3 changed files with 4 additions and 4 deletions
|
@ -2558,7 +2558,7 @@ impl<'a, T> Place<T> for PlaceBack<'a, T> {
|
|||
impl<'a, T> InPlace<T> for PlaceBack<'a, T> {
|
||||
type Owner = &'a mut T;
|
||||
|
||||
unsafe fn finalize(mut self) -> &'a mut T {
|
||||
unsafe fn finalize(self) -> &'a mut T {
|
||||
let head = self.vec_deque.head;
|
||||
self.vec_deque.head = self.vec_deque.wrap_add(head, 1);
|
||||
&mut *(self.vec_deque.ptr().offset(head as isize))
|
||||
|
@ -2605,7 +2605,7 @@ impl<'a, T> Place<T> for PlaceFront<'a, T> {
|
|||
impl<'a, T> InPlace<T> for PlaceFront<'a, T> {
|
||||
type Owner = &'a mut T;
|
||||
|
||||
unsafe fn finalize(mut self) -> &'a mut T {
|
||||
unsafe fn finalize(self) -> &'a mut T {
|
||||
self.vec_deque.tail = self.vec_deque.wrap_sub(self.vec_deque.tail, 1);
|
||||
&mut *(self.vec_deque.ptr().offset(self.vec_deque.tail as isize))
|
||||
}
|
||||
|
|
|
@ -563,7 +563,7 @@ impl<'t, K, V> FullBucket<K, V, &'t mut RawTable<K, V>> {
|
|||
///
|
||||
/// This works similarly to `put`, building an `EmptyBucket` out of the
|
||||
/// taken bucket.
|
||||
pub fn take(mut self) -> (EmptyBucket<K, V, &'t mut RawTable<K, V>>, K, V) {
|
||||
pub fn take(self) -> (EmptyBucket<K, V, &'t mut RawTable<K, V>>, K, V) {
|
||||
self.table.size -= 1;
|
||||
|
||||
unsafe {
|
||||
|
|
|
@ -529,7 +529,7 @@ impl<'a, 'b> Context<'a, 'b> {
|
|||
|
||||
/// Actually builds the expression which the format_args! block will be
|
||||
/// expanded to
|
||||
fn into_expr(mut self) -> P<ast::Expr> {
|
||||
fn into_expr(self) -> P<ast::Expr> {
|
||||
let mut locals = Vec::new();
|
||||
let mut counts = Vec::new();
|
||||
let mut pats = Vec::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue