remove unnecessary @constCast

This commit is contained in:
Jeffrey C. Ollie
2024-09-02 02:48:22 -05:00
committed by Mitchell Hashimoto
parent 6edeb45e7e
commit d6e5c8e20f

View File

@ -20,7 +20,7 @@ pub fn decode(alloc: std.mem.Allocator, data: []const u8) Error!struct {
const decoder_buf = try alloc.alloc(u8, c.sizeof__wuffs_png__decoder()); const decoder_buf = try alloc.alloc(u8, c.sizeof__wuffs_png__decoder());
defer alloc.free(decoder_buf); defer alloc.free(decoder_buf);
const decoder: ?*c.wuffs_png__decoder = @constCast(@ptrCast(decoder_buf)); const decoder: ?*c.wuffs_png__decoder = @ptrCast(decoder_buf);
{ {
const status = c.wuffs_png__decoder__initialize( const status = c.wuffs_png__decoder__initialize(
decoder, decoder,