Skip to content

Commit

Permalink
Replace mem::replace with mem::take
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jan 27, 2024
1 parent ed68996 commit ee71ecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pin-project-internal/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl ReplaceReceiver<'_> {

path.leading_colon = Some(**path.segments.pairs().next().unwrap().punct().unwrap());

let segments = mem::replace(&mut path.segments, Punctuated::new());
let segments = mem::take(&mut path.segments);
path.segments = segments.into_pairs().skip(1).collect();
}

Expand Down

0 comments on commit ee71ecc

Please sign in to comment.