treewide: rename error union fields to be title case
Browse files
+4 −4 src/x11/display.zig
| @@ -2,8 +2,8 @@ const std = @import("std"); | ||
| 2 | 2 | const xlib = @import("xlib.zig"); |
| 3 | 3 | |
| 4 | 4 | pub const DisplayError = error{ |
| 5 | - cannot_open_display, | |
| 6 | - another_wm_running, | |
| 5 | + CannotOpenDisplay, | |
| 6 | + AnotherWmRunning, | |
| 7 | 7 | }; |
| 8 | 8 | |
| 9 | 9 | var wm_detected: bool = false; |
| @@ -14,7 +14,7 @@ pub const Display = struct { | ||
| 14 | 14 | root: xlib.Window, |
| 15 | 15 | |
| 16 | 16 | pub fn open() DisplayError!Display { |
| 17 | - const handle = xlib.XOpenDisplay(null) orelse return DisplayError.cannot_open_display; | |
| 17 | + const handle = xlib.XOpenDisplay(null) orelse return DisplayError.CannotOpenDisplay; | |
| 18 | 18 | const screen = xlib.XDefaultScreen(handle); |
| 19 | 19 | const root = xlib.XRootWindow(handle, screen); |
| 20 | 20 | |
| @@ -40,7 +40,7 @@ pub const Display = struct { | ||
| 40 | 40 | _ = xlib.XSync(self.handle, xlib.False); |
| 41 | 41 | |
| 42 | 42 | if (wm_detected) { |
| 43 | - return DisplayError.another_wm_running; | |
| 43 | + return DisplayError.AnotherWmRunning; | |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | _ = xlib.XSetErrorHandler(onXError); |