MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / insert_with_offset_multiplier

Function insert_with_offset_multiplier

rust/tests/test_utils.rs:83–93  ·  view source on GitHub ↗

Insert data with offset and multiplier (key = offset + i * multiplier)

(
    tree: &mut BPlusTreeMap<i32, String>,
    count: usize,
    offset: i32,
    multiplier: i32,
)

Source from the content-addressed store, hash-verified

81
82/// Insert data with offset and multiplier (key = offset + i * multiplier)
83pub fn insert_with_offset_multiplier(
84 tree: &mut BPlusTreeMap<i32, String>,
85 count: usize,
86 offset: i32,
87 multiplier: i32,
88) {
89 for i in 0..count {
90 let key = offset + (i as i32) * multiplier;
91 tree.insert(key, format!("value_{}", i));
92 }
93}
94
95/// Insert data with custom key and value functions
96pub fn insert_with_custom_fn<F, G>(

Callers 1

test_operation_safetyFunction · 0.85

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected