mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-01 19:34:42 +00:00
code style: use @splat where possible
As of Zig 0.14.0, `@splat` can be used for array types, which eliminates a lot of redundant syntax and makes things generally cleaner. I've explicitly avoided applying this change in the renderer files for now since it would just create rebasing conflicts in my renderer rework branch which I'll be PR-ing pretty soon.
This commit is contained in:
@@ -70,7 +70,7 @@ pub fn CacheTable(
|
||||
/// become a pointless check, but hopefully branch prediction picks
|
||||
/// up on it at that point. The memory cost isn't too bad since it's
|
||||
/// just bytes, so should be a fraction the size of the main table.
|
||||
lengths: [bucket_count]u8 = [_]u8{0} ** bucket_count,
|
||||
lengths: [bucket_count]u8 = @splat(0),
|
||||
|
||||
/// An instance of the context structure.
|
||||
/// Must be initialized before calling any operations.
|
||||
|
||||
Reference in New Issue
Block a user