diff options
Diffstat (limited to 'lib/std/priority_dequeue.zig')
| -rw-r--r-- | lib/std/priority_dequeue.zig | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/std/priority_dequeue.zig b/lib/std/priority_dequeue.zig index e8862ae631..be81abd96c 100644 --- a/lib/std/priority_dequeue.zig +++ b/lib/std/priority_dequeue.zig @@ -1,7 +1,6 @@ const std = @import("std.zig"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; -const warn = std.debug.warn; const Order = std.math.Order; const testing = std.testing; const expect = testing.expect; @@ -355,8 +354,7 @@ pub fn PriorityDequeue(comptime T: type, comptime compareFn: fn (T, T) Order) ty return queue; } - /// Deprecated: call `ensureUnusedCapacity` or `ensureTotalCapacity`. - pub const ensureCapacity = ensureTotalCapacity; + pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); /// Ensure that the dequeue can fit at least `new_capacity` items. pub fn ensureTotalCapacity(self: *Self, new_capacity: usize) !void { @@ -421,19 +419,20 @@ pub fn PriorityDequeue(comptime T: type, comptime compareFn: fn (T, T) Order) ty } fn dump(self: *Self) void { - warn("{{ ", .{}); - warn("items: ", .{}); + const print = std.debug.print; + print("{{ ", .{}); + print("items: ", .{}); for (self.items) |e, i| { if (i >= self.len) break; - warn("{}, ", .{e}); + print("{}, ", .{e}); } - warn("array: ", .{}); + print("array: ", .{}); for (self.items) |e| { - warn("{}, ", .{e}); + print("{}, ", .{e}); } - warn("len: {} ", .{self.len}); - warn("capacity: {}", .{self.capacity()}); - warn(" }}\n", .{}); + print("len: {} ", .{self.len}); + print("capacity: {}", .{self.capacity()}); + print(" }}\n", .{}); } fn parentIndex(index: usize) usize { |
