just defer
This commit is contained in:
parent
77cc69efe0
commit
4df334896c
1 changed files with 1 additions and 2 deletions
|
|
@ -286,7 +286,7 @@ fn mergeAllocsBySymbol(allocs: *std.ArrayList(Allocation), allocator: std.mem.Al
|
|||
|
||||
// Build merged result
|
||||
var merged = std.ArrayList(Allocation).empty;
|
||||
errdefer merged.deinit(allocator);
|
||||
defer merged.deinit(allocator);
|
||||
|
||||
// Track which symbols we've already merged
|
||||
var done = std.StringHashMap(void).init(allocator);
|
||||
|
|
@ -344,7 +344,6 @@ fn mergeAllocsBySymbol(allocs: *std.ArrayList(Allocation), allocator: std.mem.Al
|
|||
for (merged.items) |a| {
|
||||
try allocs.append(allocator, a);
|
||||
}
|
||||
merged.deinit(allocator);
|
||||
}
|
||||
|
||||
/// Compute portfolio summary given positions and current prices.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue