MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / remove_entry

Function remove_entry

nodedb-columnar/src/pk_index.rs:238–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

236
237 #[test]
238 fn remove_entry() {
239 let mut idx = PkIndex::new();
240 let pk = encode_pk(&Value::Integer(1));
241 let loc = RowLocation {
242 segment_id: 0,
243 row_index: 0,
244 };
245
246 idx.insert(pk.clone(), loc).expect("insert");
247 let removed = idx.remove(&pk);
248 assert_eq!(removed, Some(loc));
249 assert!(idx.is_empty());
250 }
251
252 #[test]
253 fn bulk_insert() {

Callers

nothing calls this directly

Calls 5

encode_pkFunction · 0.85
expectMethod · 0.45
insertMethod · 0.45
cloneMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected