From 5e33d77160b2e7178d33cd78ba65f511de63e0d8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 11 Aug 2024 21:39:18 -0700 Subject: [PATCH] config: use else to catch all errors since there are many --- src/config/theme.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/config/theme.zig b/src/config/theme.zig index 16aa244fe..62b1468fa 100644 --- a/src/config/theme.zig +++ b/src/config/theme.zig @@ -48,9 +48,10 @@ pub const Location = enum { error.OutOfMemory => return error.OutOfMemory, error.BufferTooSmall => return error.OutOfMemory, - // No home dir means we don't have an XDG config dir - // so we can just return null. - error.NoHomeDir => return null, + // Any other error we treat as the XDG directory not + // existing. Windows in particularly can return a LOT + // of errors here. + else => return null, }; },