解决Vec移除元素时长度不更新的问题

This commit is contained in:
pointer-to-bios 2024-05-02 20:49:58 +08:00
parent 41dd0a0e00
commit 6a935dc2b7
1 changed files with 1 additions and 0 deletions

View File

@ -112,6 +112,7 @@ impl<T: Default> Vec<T> {
self.length - index - 1,
);
}
self.length -= 1;
t
}