(mmap: &mut memmap2::MmapMut, offset: usize, value: &str)
| 99 | } |
| 100 | |
| 101 | fn write_str(mmap: &mut memmap2::MmapMut, offset: usize, value: &str) { |
| 102 | let bytes = value.as_bytes(); |
| 103 | let copy_len = bytes.len().min(FIELD_LEN - 1); |
| 104 | mmap[offset..offset + FIELD_LEN].fill(0); |
| 105 | mmap[offset..offset + copy_len].copy_from_slice(&bytes[..copy_len]); |
| 106 | } |
| 107 | |
| 108 | fn write_entry_inner( |
| 109 | mmap_path: &Path, |