Optimize list_of_first
This commit is contained in:
parent
c6e7a42b7e
commit
2ae904cc8a
1 changed files with 1 additions and 5 deletions
|
@ -217,11 +217,7 @@ impl<'a, 'b> Term<'a, 'b> {
|
|||
let remaining_offset = remaining_begin - raw.as_ptr() as usize;
|
||||
let remaining_raw = &raw[remaining_offset..];
|
||||
|
||||
let remaining = list[N - 1..]
|
||||
.iter()
|
||||
.map(|x| x.mkref())
|
||||
.collect::<Vec<NonListTerm<'a, '_>>>();
|
||||
ret.push(Term(AnyTerm::List(remaining_raw, remaining)));
|
||||
ret.push(Term(AnyTerm::ListRef(remaining_raw, &list[N - 1..])));
|
||||
|
||||
Ok(ret.try_into().unwrap())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue