pma: format

This commit is contained in:
Edward Amsden 2023-12-20 00:20:10 -06:00
parent 3ae877f655
commit 4080f50145
2 changed files with 4 additions and 5 deletions

View File

@ -557,8 +557,7 @@ impl<T: Copy + Preserve> Preserve for Hamt<T> {
typemap: next_stem.typemap,
buffer: dest_buffer,
};
*stem.buffer.add(idx) =
Entry { stem: new_stem };
*stem.buffer.add(idx) = Entry { stem: new_stem };
assert!(traversal_depth <= 5); // will increment
traversal_stack[traversal_depth - 1] =
Some((stem, position + 1));
@ -583,8 +582,7 @@ impl<T: Copy + Preserve> Preserve for Hamt<T> {
pair.0.preserve(stack);
pair.1.preserve(stack);
}
*stem.buffer.add(idx) =
Entry { leaf: new_leaf };
*stem.buffer.add(idx) = Entry { leaf: new_leaf };
}
position += 1;
continue 'preserve_stem;

View File

@ -38,7 +38,8 @@ pub fn pma_open(path: PathBuf) -> Result<(), std::io::Error> {
bt_state_new(&mut state);
let err = bt_state_open(state, path_cstring.as_ptr(), PMA_FLAGS, PMA_MODE);
if err == 0 {
PMA.set(PMAState(state as u64)).map_err(|state| state.0 as *mut BT_state)
PMA.set(PMAState(state as u64))
.map_err(|state| state.0 as *mut BT_state)
.expect("PMA state already initialized to:");
assert!(get_pma_state().is_some());
Ok(())