mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-16 06:46:09 +00:00
style: use decl literals
This commit changes a LOT of areas of the code to use decl literals instead of redundantly referring to the type. These changes were mostly driven by some regex searches and then manual adjustment on a case-by-case basis. I almost certainly missed quite a few places where decl literals could be used, but this is a good first step in converting things, and other instances can be addressed when they're discovered. I tested GLFW+Metal and building the framework on macOS and tested a GTK build on Linux, so I'm 99% sure I didn't introduce any syntax errors or other problems with this. (fingers crossed)
This commit is contained in:
@@ -331,7 +331,7 @@ pub const Item = union(enum) {
|
||||
|
||||
// Decode the item.
|
||||
self.* = switch (encoded.type) {
|
||||
.attachment => .{ .attachment = try Attachment.decode(
|
||||
.attachment => .{ .attachment = try .decode(
|
||||
alloc,
|
||||
encoded,
|
||||
) },
|
||||
|
Reference in New Issue
Block a user