const MapContext = struct cb: *const Bundlepub fn hash(ctx: MapContext, k: der.Element.Slice) u64pub fn eql(ctx: MapContext, a: der.Element.Slice, b: der.Element.Slice) bool318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333const MapContext = struct {
cb: *const Bundle,
pub fn hash(ctx: MapContext, k: der.Element.Slice) u64 {
return std.hash_map.hashString(ctx.cb.bytes.items[k.start..k.end]);
}
pub fn eql(ctx: MapContext, a: der.Element.Slice, b: der.Element.Slice) bool {
const bytes = ctx.cb.bytes.items;
return mem.eql(
u8,
bytes[a.start..a.end],
bytes[b.start..b.end],
);
}
}