refactor: BREAKING merge gutter_line_numbers and gutter_line_numbers_relative config options into an enum
This commit is contained in:
parent
ec3bba2aff
commit
b9cc3936c8
4 changed files with 30 additions and 32 deletions
|
@ -619,6 +619,13 @@ fn config_eql(comptime T: type, a: T, b: T) bool {
|
|||
}
|
||||
switch (@typeInfo(T)) {
|
||||
.Bool, .Int, .Float, .Enum => return a == b,
|
||||
.Optional => |info| {
|
||||
if (a == null and b == null)
|
||||
return true;
|
||||
if (a == null or b == null)
|
||||
return false;
|
||||
return config_eql(info.child, a.?, b.?);
|
||||
},
|
||||
else => {},
|
||||
}
|
||||
@compileError("unsupported config type " ++ @typeName(T));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue