bf-tree 0.5.0

Bf-Tree is a modern read-write-optimized concurrent larger-than-memory range index in Rust from Microsoft Research.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#[cfg(test)]
pub(crate) fn install_value_to_buffer(buffer: &mut [usize], key_id: usize) -> &[u8] {
    for i in buffer.iter_mut() {
        *i = key_id;
    }

    unsafe {
        let ptr = buffer.as_ptr();
        std::slice::from_raw_parts(ptr as *const u8, buffer.len() * 8)
    }
}