mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
src/ui.zig: update to language changes in Zig 0.12.0-dev.2150+63de8a598
* `name` field of std.builtin.Type struct changed type from `[]const u8` to `[:0]const u8`: https://github.com/ziglang/zig/pull/18470 . * New `'comptime var' is redundant in comptime scope` error introduced in https://github.com/ziglang/zig/pull/18242 . Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
This commit is contained in:
parent
c41e3f5828
commit
8ce5bae872
1 changed files with 2 additions and 2 deletions
|
|
@ -194,7 +194,7 @@ test "shorten" {
|
||||||
|
|
||||||
const StyleAttr = struct { fg: i16, bg: i16, attr: u32 };
|
const StyleAttr = struct { fg: i16, bg: i16, attr: u32 };
|
||||||
const StyleDef = struct {
|
const StyleDef = struct {
|
||||||
name: []const u8,
|
name: [:0]const u8,
|
||||||
off: StyleAttr,
|
off: StyleAttr,
|
||||||
dark: StyleAttr,
|
dark: StyleAttr,
|
||||||
darkbg: StyleAttr,
|
darkbg: StyleAttr,
|
||||||
|
|
@ -279,7 +279,7 @@ const styles = [_]StyleDef{
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Style = lbl: {
|
pub const Style = lbl: {
|
||||||
comptime var fields: [styles.len]std.builtin.Type.EnumField = undefined;
|
var fields: [styles.len]std.builtin.Type.EnumField = undefined;
|
||||||
for (&fields, styles, 0..) |*field, s, i| {
|
for (&fields, styles, 0..) |*field, s, i| {
|
||||||
field.* = .{
|
field.* = .{
|
||||||
.name = s.name,
|
.name = s.name,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue