mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-28 03:26:28 +00:00
update zig
This commit is contained in:
@@ -13,7 +13,7 @@ const c = switch (builtin.os.tag) {
|
||||
@cInclude("sys/ioctl.h"); // ioctl and constants
|
||||
@cInclude("util.h"); // openpty()
|
||||
}),
|
||||
.windows => { },
|
||||
.windows => {},
|
||||
else => @cImport({
|
||||
@cInclude("sys/ioctl.h"); // ioctl and constants
|
||||
@cInclude("pty.h");
|
||||
|
||||
@@ -82,7 +82,7 @@ pub fn parse(comptime T: type, alloc: Allocator, dst: *T, iter: anytype) !void {
|
||||
// The error set is dependent on comptime T, so we always add
|
||||
// an extra error so we can have the "else" below.
|
||||
const ErrSet = @TypeOf(err) || error{Unknown};
|
||||
switch (@as(ErrSet, @errSetCast(err))) {
|
||||
switch (@as(ErrSet, @errorCast(err))) {
|
||||
// OOM is not recoverable since we need to allocate to
|
||||
// track more error messages.
|
||||
error.OutOfMemory => return err,
|
||||
|
||||
@@ -38,7 +38,7 @@ pub fn main() !MainReturn {
|
||||
const stderr = std.io.getStdErr().writer();
|
||||
defer std.os.exit(1);
|
||||
const ErrSet = @TypeOf(err) || error{Unknown};
|
||||
switch (@as(ErrSet, @errSetCast(err))) {
|
||||
switch (@as(ErrSet, @errorCast(err))) {
|
||||
error.MultipleActions => try stderr.print(
|
||||
"Error: multiple CLI actions specified. You must specify only one\n" ++
|
||||
"action starting with the `+` character.\n",
|
||||
|
||||
@@ -15,11 +15,11 @@ comptime {
|
||||
}
|
||||
|
||||
/// Used to determine the default shell and directory on Unixes.
|
||||
const c = if (builtin.os.tag == .windows) { } else @cImport({
|
||||
const c = if (builtin.os.tag != .windows) @cImport({
|
||||
@cInclude("sys/types.h");
|
||||
@cInclude("unistd.h");
|
||||
@cInclude("pwd.h");
|
||||
});
|
||||
}) else {};
|
||||
|
||||
// Entry that is retrieved from the passwd API. This only contains the fields
|
||||
// we care about.
|
||||
|
||||
@@ -385,7 +385,7 @@ fn cursorCancelCallback(
|
||||
Unexpected,
|
||||
};
|
||||
|
||||
_ = r catch |err| switch (@as(CancelError, @errSetCast(err))) {
|
||||
_ = r catch |err| switch (@as(CancelError, @errorCast(err))) {
|
||||
error.Canceled => {},
|
||||
else => {
|
||||
log.warn("error in cursor cancel callback err={}", .{err});
|
||||
|
||||
Reference in New Issue
Block a user