mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove workaround for rust-lang/rust#22244
This commit is contained in:
parent
1ead92b474
commit
6ef9cb4e18
1 changed files with 0 additions and 4 deletions
|
@ -9,10 +9,6 @@ use std::mem;
|
|||
|
||||
/// Splits the head off a list in O(1) time, and returns the head.
|
||||
pub fn split_off_head<T>(list: &mut LinkedList<T>) -> LinkedList<T> {
|
||||
// FIXME: Work around https://github.com/rust-lang/rust/issues/22244
|
||||
if list.len() == 1 {
|
||||
return mem::replace(list, LinkedList::new());
|
||||
}
|
||||
let tail = list.split_off(1);
|
||||
mem::replace(list, tail)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue