Implement Copy for multibuffer anchors

This commit is contained in:
Max Brunsfeld 2022-11-23 16:56:22 -08:00
parent f71145bb32
commit 718f802157
7 changed files with 26 additions and 34 deletions

View file

@ -2305,7 +2305,7 @@ impl MultiBufferSnapshot {
break;
}
let (anchor_ix, anchor) = anchors.next().unwrap();
let mut anchor = anchor.clone();
let mut anchor = *anchor;
// Leave min and max anchors unchanged if invalid or
// if the old excerpt still exists at this location