tokio: bump MSRV to 1.56 (#5559)

This commit is contained in:
Alice Ryhl
2023-03-21 18:06:47 +01:00
committed by GitHub
parent 2dfe4e8885
commit 0c8e8248f8
29 changed files with 86 additions and 130 deletions
@@ -239,11 +239,7 @@ fn remove_child(parent: &mut Inner, mut node: MutexGuard<'_, Inner>) {
let len = parent.children.len();
if 4 * len <= parent.children.capacity() {
// equal to:
// parent.children.shrink_to(2 * len);
// but shrink_to was not yet stabilized in our minimal compatible version
let old_children = std::mem::replace(&mut parent.children, Vec::with_capacity(2 * len));
parent.children.extend(old_children);
parent.children.shrink_to(2 * len);
}
}