font: improve log statements a bit

This commit is contained in:
Mitchell Hashimoto
2024-04-01 15:44:42 -07:00
parent 5de88fe3f8
commit 7b428367df

View File

@ -90,6 +90,8 @@ pub fn groupRef(
const gop = try self.map.getOrPut(self.alloc, key);
if (gop.found_existing) {
log.debug("found cached GroupCache for font config", .{});
// We can deinit the key because we found a cached value.
key.deinit();
@ -99,6 +101,8 @@ pub fn groupRef(
}
errdefer self.map.removeByPtr(gop.key_ptr);
log.debug("initializing new GroupCache for font config", .{});
// A new font config, initialize the cache.
const cache = try self.alloc.create(GroupCache);
errdefer self.alloc.destroy(cache);