fix failing clippy checks, remove unnecessary code
This commit is contained in:
@@ -298,9 +298,11 @@ impl IndexStore {
|
||||
_ => self
|
||||
.get_meta_predicate_spec(key.0, key.1, &compilation_target)
|
||||
.map(|meta_specs| {
|
||||
meta_specs.iter().find(|meta_spec| match meta_spec {
|
||||
MetaSpec::Colon | MetaSpec::RequiresExpansionWithArgument(_) => true,
|
||||
_ => false,
|
||||
meta_specs.iter().find(|meta_spec| {
|
||||
matches!(
|
||||
meta_spec,
|
||||
MetaSpec::Colon | MetaSpec::RequiresExpansionWithArgument(_)
|
||||
)
|
||||
})
|
||||
})
|
||||
.map(|meta_spec_opt| meta_spec_opt.is_some())
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user