fix failing clippy checks, remove unnecessary code

This commit is contained in:
Mark Thom
2024-04-25 20:05:22 -06:00
parent be23c74b17
commit 5e1effc69a
4 changed files with 16 additions and 25 deletions

View File

@@ -428,14 +428,12 @@ impl BrentAlgState {
pstr_chars = pstr.as_str_from(n).chars().count() - 1;
if heap[h].get_tag() == HeapCellValueTag::PStrOffset {
if heap[h_offset].get_tag() == HeapCellValueTag::CStr {
return if pstr_chars < max_steps {
CycleSearchResult::ProperList(pstr_chars + 1)
} else {
let offset = max_steps as usize + n;
CycleSearchResult::PStrLocation(max_steps, h_offset, offset)
}
if heap[h].get_tag() == HeapCellValueTag::PStrOffset && heap[h_offset].get_tag() == HeapCellValueTag::CStr {
return if pstr_chars < max_steps {
CycleSearchResult::ProperList(pstr_chars + 1)
} else {
let offset = max_steps + n;
CycleSearchResult::PStrLocation(max_steps, h_offset, offset)
}
}