Make all things const

The quest for idiomatic zig continues
This commit is contained in:
Isaac Freund
2020-03-24 20:35:45 +01:00
parent 4872a68378
commit b3bad0ca93
7 changed files with 51 additions and 49 deletions

View File

@ -52,7 +52,7 @@ pub const Keyboard = struct {
fn handle_modifiers(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
// This event is raised when a modifier key, such as shift or alt, is
// pressed. We simply communicate this to the client. */
var keyboard = @fieldParentPtr(Keyboard, "listen_modifiers", listener.?);
const keyboard = @fieldParentPtr(Keyboard, "listen_modifiers", listener.?);
// A seat can only have one keyboard, but this is a limitation of the
// Wayland protocol - not wlroots. We assign all connected keyboards to the