Skip to content

Commit 948a04a

Browse files
mstdokumacijinzhongjia
authored andcommitted
lint
1 parent 0d1788e commit 948a04a

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/msgpack.zig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,10 @@ fn clonePayload(payload: Payload, allocator: Allocator) !Payload {
875875
}
876876
allocator.free(new_arr);
877877
}
878-
879878
for (arr, 0..) |item, i| {
880-
const cloned_item = try clonePayload(item, allocator);
881-
new_arr[i] = cloned_item;
879+
new_arr[i] = try clonePayload(item, allocator);
882880
cloned_count += 1;
883881
}
884-
885882
return Payload{ .arr = new_arr };
886883
},
887884

@@ -900,7 +897,6 @@ fn clonePayload(payload: Payload, allocator: Allocator) !Payload {
900897
// Use putInternal to insert without additional cloning
901898
try new_map.putInternal(cloned_key, cloned_value);
902899
}
903-
904900
return Payload{ .map = new_map };
905901
},
906902
};

0 commit comments

Comments
 (0)