mirror of
https://github.com/urbit/ares.git
synced 2025-01-08 06:27:07 +03:00
pma: format
This commit is contained in:
parent
3ae877f655
commit
4080f50145
@ -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;
|
||||
|
@ -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(())
|
||||
|
Loading…
Reference in New Issue
Block a user