diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 6aa06b8..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "Ubuntu", - "image": "mcr.microsoft.com/devcontainers/base:jammy", - "features": { - "ghcr.io/devcontainers-contrib/features/zig:1": { - "version": "master" - } - }, - "customizations": { - "vscode": { - "extensions": [ - "tiehuis.zig", - "AugusteRame.zls-vscode" - ] - } - } -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 4b176ea..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "recommendations": [ - "tiehuis.zig", - "augusterame.zls-vscode" - ] -} \ No newline at end of file diff --git a/src/backend/Backend.zig b/src/backend/Backend.zig index ef4e00f..5cba3de 100644 --- a/src/backend/Backend.zig +++ b/src/backend/Backend.zig @@ -352,7 +352,7 @@ pub fn Backend(comptime config: Config) type { }; inline fn getSelf(interface: System) *Self { - return @ptrCast(*Self, @alignCast(@alignOf(Self), interface._ptr)); + return @as(*Self, @ptrCast(@alignCast(interface._ptr))); } comptime { diff --git a/src/backend/FileSystemBackend.zig b/src/backend/FileSystemBackend.zig index 6cc5a87..76e8e9b 100644 --- a/src/backend/FileSystemBackend.zig +++ b/src/backend/FileSystemBackend.zig @@ -35,7 +35,7 @@ pub fn FileSystemBackend(comptime config: Config) type { break :blk permissions; }; - const CWD = @ptrFromInt(*anyopaque, std.mem.alignBackward(std.math.maxInt(usize), @alignOf(View))); + const CWD: *anyopaque = @ptrFromInt(std.mem.alignBackward(std.math.maxInt(usize), @alignOf(View))); const Self = @This(); const FileSystemType = Self; @@ -55,7 +55,7 @@ pub fn FileSystemBackend(comptime config: Config) type { }; errdefer self.destroy(); - try self.entries.ensureTotalCapacity(allocator, @intCast(u32, fsd.entries.items.len)); + try self.entries.ensureTotalCapacity(allocator, @intCast(fsd.entries.items.len)); var opt_root: ?*Entry = null; var opt_cwd_entry: ?*Entry = null; @@ -199,7 +199,7 @@ pub fn FileSystemBackend(comptime config: Config) type { /// Cast the given `ptr` to a view if it is one. inline fn toView(self: *Self, ptr: *anyopaque) ?*View { - const view = @ptrCast(*View, @alignCast(@alignOf(View), ptr)); + const view = @as(*View, @ptrCast(@alignCast(ptr))); if (self.views.contains(view)) { return view; }