From 79e4082d8bc842ba4bc374745f6acc3d7a5359da Mon Sep 17 00:00:00 2001 From: Congyu Date: Thu, 29 Feb 2024 16:40:26 +0800 Subject: [PATCH] remove unstable feature from test --- tests/cdlist_test.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/cdlist_test.rs b/tests/cdlist_test.rs index a738d73..9768062 100644 --- a/tests/cdlist_test.rs +++ b/tests/cdlist_test.rs @@ -1,4 +1,3 @@ -#![feature(get_many_mut)] use cdlist::LinkNode; #[test] @@ -109,8 +108,8 @@ fn collect_rev(node: &LinkNode) -> Vec { } fn connect_all(nodes: &mut [LinkNode], start: usize, end: usize) { - (start..(end - 1)).zip((start + 1)..end).for_each(|(i, j)| { - let [ni, nj] = nodes.get_many_mut([i, j]).unwrap(); - ni.add(nj); - }); + for i in start..(end - 1) { + let (ni, nj) = nodes[i..].split_at_mut(1); + ni[0].add(&mut nj[0]) + } }