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 | const xlib = @import("xlib.zig"); | 2 | const xlib = @import("xlib.zig"); |
| 3 | 3 | ||
| 4 | pub const DisplayError = error{ | 4 | pub const DisplayError = error{ |
| 5 | - cannot_open_display, | 5 | + CannotOpenDisplay, |
| 6 | - another_wm_running, | 6 | + AnotherWmRunning, |
| 7 | }; | 7 | }; |
| 8 | 8 | ||
| 9 | var wm_detected: bool = false; | 9 | var wm_detected: bool = false; |
| @@ -14,7 +14,7 @@ pub const Display = struct { | |||
| 14 | root: xlib.Window, | 14 | root: xlib.Window, |
| 15 | 15 | ||
| 16 | pub fn open() DisplayError!Display { | 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 | const screen = xlib.XDefaultScreen(handle); | 18 | const screen = xlib.XDefaultScreen(handle); |
| 19 | const root = xlib.XRootWindow(handle, screen); | 19 | const root = xlib.XRootWindow(handle, screen); |
| 20 | 20 | ||
| @@ -40,7 +40,7 @@ pub const Display = struct { | |||
| 40 | _ = xlib.XSync(self.handle, xlib.False); | 40 | _ = xlib.XSync(self.handle, xlib.False); |
| 41 | 41 | ||
| 42 | if (wm_detected) { | 42 | if (wm_detected) { |
| 43 | - return DisplayError.another_wm_running; | 43 | + return DisplayError.AnotherWmRunning; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | _ = xlib.XSetErrorHandler(onXError); | 46 | _ = xlib.XSetErrorHandler(onXError); |