mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
std.fs: remove unnecessary @ptrCast (#17805)
This commit is contained in:
parent
8457439a84
commit
46062f1c13
@ -23,7 +23,7 @@ pub fn getAppDataDir(allocator: mem.Allocator, appname: []const u8) GetAppDataDi
|
||||
&dir_path_ptr,
|
||||
)) {
|
||||
os.windows.S_OK => {
|
||||
defer os.windows.ole32.CoTaskMemFree(@as(*anyopaque, @ptrCast(dir_path_ptr)));
|
||||
defer os.windows.ole32.CoTaskMemFree(dir_path_ptr);
|
||||
const global_dir = unicode.utf16leToUtf8Alloc(allocator, mem.sliceTo(dir_path_ptr, 0)) catch |err| switch (err) {
|
||||
error.UnexpectedSecondSurrogateHalf => return error.AppDataDirUnavailable,
|
||||
error.ExpectedSecondSurrogateHalf => return error.AppDataDirUnavailable,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user