refactor: remove pointless dupe call in move_to_char
This commit is contained in:
parent
223260887d
commit
f6234e6048
1 changed files with 1 additions and 5 deletions
|
|
@ -44,15 +44,11 @@ pub fn start(self: *Type) ValueType {
|
||||||
|
|
||||||
return .{
|
return .{
|
||||||
.direction = direction,
|
.direction = direction,
|
||||||
.operation_command = self.allocator.dupe(u8, operation_command) catch @panic("OOM in move_to_char"),
|
.operation_command = operation_command,
|
||||||
.operation = operation,
|
.operation = operation,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(self: *Type) void {
|
|
||||||
self.allocator.free(self.value.operation_command);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn name(self: *Type) []const u8 {
|
pub fn name(self: *Type) []const u8 {
|
||||||
return switch (self.value.operation) {
|
return switch (self.value.operation) {
|
||||||
.move => switch (self.value.direction) {
|
.move => switch (self.value.direction) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue