fix compare_pstr_to_string (#2148)
This commit is contained in:
@@ -68,7 +68,7 @@ pub struct HeapPStrIter<'a> {
|
|||||||
stepper: fn(&mut HeapPStrIter<'a>) -> Option<PStrIteratee>,
|
stepper: fn(&mut HeapPStrIter<'a>) -> Option<PStrIteratee>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct PStrPrefixCmpResult {
|
pub struct PStrPrefixCmpResult {
|
||||||
pub focus: usize,
|
pub focus: usize,
|
||||||
pub offset: usize,
|
pub offset: usize,
|
||||||
@@ -193,7 +193,7 @@ impl<'a> HeapPStrIter<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final_result
|
Some(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn walk_hare_to_cycle_end(&mut self) {
|
fn walk_hare_to_cycle_end(&mut self) {
|
||||||
@@ -336,9 +336,9 @@ impl<'a> HeapPStrIter<'a> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return value.as_char().map(|c| PStrIterStep {
|
return value.as_char().map(|c| PStrIterStep {
|
||||||
iteratee: PStrIteratee::Char(curr_hare, c),
|
iteratee: PStrIteratee::Char(curr_hare, c),
|
||||||
next_hare: h+1,
|
next_hare: h+1,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
(HeapCellValueTag::Str, s) => {
|
(HeapCellValueTag::Str, s) => {
|
||||||
let (name, arity) = cell_as_atom_cell!(self.heap[s])
|
let (name, arity) = cell_as_atom_cell!(self.heap[s])
|
||||||
|
|||||||
Reference in New Issue
Block a user