mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-15 03:52:39 +00:00
Apply suggestion from @pluiedev
Co-authored-by: Leah Amelia Chen <github@acc.pluie.me>
This commit is contained in:
@@ -61,10 +61,8 @@ pub const Key = enum {
|
||||
/// const enabled = get(.gtk_enable_primary_paste);
|
||||
/// const dpi = get(.gtk_xft_dpi);
|
||||
pub fn get(comptime key: Key) ?key.Type() {
|
||||
comptime {
|
||||
if (key.requiresAllocation()) {
|
||||
@compileError("Allocating types require an allocator; use getAlloc() instead");
|
||||
}
|
||||
if (comptime key.requiresAllocation()) {
|
||||
@compileError("Allocating types require an allocator; use getAlloc() instead");
|
||||
}
|
||||
const settings = gtk.Settings.getDefault() orelse return null;
|
||||
return getImpl(settings, null, key) catch unreachable;
|
||||
|
||||
Reference in New Issue
Block a user