mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 18:37:59 +00:00
Use mem::take instead of mem::replace where appropriate (#5846)
* replace replace with take * Update client/api/src/cht.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/api/src/cht.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -232,7 +232,7 @@ pub fn for_each_cht_group<Header, I, F, P>(
|
||||
functor_param = functor(
|
||||
functor_param,
|
||||
current_cht_num,
|
||||
::std::mem::replace(&mut current_cht_blocks, Vec::new()),
|
||||
std::mem::take(&mut current_cht_blocks),
|
||||
)?;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ pub fn for_each_cht_group<Header, I, F, P>(
|
||||
functor(
|
||||
functor_param,
|
||||
current_cht_num,
|
||||
::std::mem::replace(&mut current_cht_blocks, Vec::new()),
|
||||
std::mem::take(&mut current_cht_blocks),
|
||||
)?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user