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

Function apply_to_validity

nodedb-columnar/src/delete_bitmap.rs:209–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207
208 #[test]
209 fn apply_to_validity() {
210 let mut bm = DeleteBitmap::new();
211 bm.mark_deleted_batch(&[2, 4]);
212
213 let mut valid = vec![true, true, true, true, true];
214 bm.apply_to_validity(&mut valid, 0);
215
216 assert!(valid[0]);
217 assert!(valid[1]);
218 assert!(!valid[2]); // Deleted.
219 assert!(valid[3]);
220 assert!(!valid[4]); // Deleted.
221 }
222
223 #[test]
224 fn apply_to_validity_with_offset() {

Callers

nothing calls this directly

Calls 2

mark_deleted_batchMethod · 0.80
apply_to_validityMethod · 0.80

Tested by

no test coverage detected