为什么 LinkedList 可变迭代器没有 `remove_next` 方法?
Why does the LinkedList mutable iterator not have a `remove_next` method?
我想要 O(1)
删除 LinkedList::IterMut
中的节点。Vec
否则不能。
没有 remove_next
方法的最可能原因是 Rust 团队正在评估游标作为替代方法:
#[inline]
#[unstable(feature = "collections",
reason = "this is probably better handled by a cursor type -- we'll see")]
[Source]
我想要 O(1)
删除 LinkedList::IterMut
中的节点。Vec
否则不能。
没有 remove_next
方法的最可能原因是 Rust 团队正在评估游标作为替代方法:
#[inline]
#[unstable(feature = "collections",
reason = "this is probably better handled by a cursor type -- we'll see")]
[Source]