Convert more usages over

This commit is contained in:
Chris Gregory 2019-06-30 11:30:01 -07:00
parent 8a3797b736
commit 636f5e6d11
30 changed files with 44 additions and 48 deletions

View file

@ -307,7 +307,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
} else {
self.resolve_imports();
if undetermined_invocations.is_empty() { break }
invocations = mem::replace(&mut undetermined_invocations, Vec::new());
invocations = mem::take(&mut undetermined_invocations);
force = !mem::replace(&mut progress, false);
continue
};

View file

@ -249,7 +249,7 @@ pub fn transcribe(
quoted::TokenTree::Delimited(mut span, delimited) => {
span = span.apply_mark(cx.current_expansion.mark);
stack.push(Frame::Delimited { forest: delimited, idx: 0, span });
result_stack.push(mem::replace(&mut result, Vec::new()));
result_stack.push(mem::take(&mut result));
}
// Nothing much to do here. Just push the token to the result, being careful to