refactor: remove pointless dupe call in move_to_char

This commit is contained in:
CJ van den Berg 2025-11-02 21:35:32 +01:00
parent 223260887d
commit f6234e6048
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -44,15 +44,11 @@ pub fn start(self: *Type) ValueType {
return .{
.direction = direction,
.operation_command = self.allocator.dupe(u8, operation_command) catch @panic("OOM in move_to_char"),
.operation_command = operation_command,
.operation = operation,
};
}
pub fn deinit(self: *Type) void {
self.allocator.free(self.value.operation_command);
}
pub fn name(self: *Type) []const u8 {
return switch (self.value.operation) {
.move => switch (self.value.direction) {