Resolve lints and format

This commit is contained in:
infogulch
2023-11-04 02:16:54 -05:00
parent dddffb01a6
commit 9444e62df9
58 changed files with 2521 additions and 2820 deletions

View File

@@ -169,7 +169,7 @@ pub(crate) fn allocate_pstr(heap: &mut Heap, mut src: &str, atom_tbl: &AtomTable
let orig_h = heap.len();
loop {
if src == "" {
if src.is_empty() {
return if orig_h == heap.len() {
None
} else {
@@ -199,7 +199,7 @@ pub(crate) fn allocate_pstr(heap: &mut Heap, mut src: &str, atom_tbl: &AtomTable
heap.push(string_as_pstr_cell!(pstr));
if rest_src != "" {
if !rest_src.is_empty() {
heap.push(pstr_loc_as_cell!(h + 2));
src = rest_src;
} else {
@@ -249,7 +249,7 @@ pub(crate) fn to_local_code_ptr(heap: &Heap, addr: HeapCellValue) -> Option<usiz
Ok(Number::Integer(n)) => {
let value: usize = (&*n).try_into().unwrap();
Some(value)
},
}
_ => None,
}
};