terminal: add explicit errorset to scroll screen

This commit is contained in:
Mitchell Hashimoto
2023-11-19 20:39:33 -08:00
parent a8579c1d5d
commit 542f605d54
2 changed files with 4 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ pub fn CircBuf(comptime T: type, comptime default: T) type {
/// Resize the buffer to the given size (larger or smaller).
/// If larger, new values will be set to the default value.
pub fn resize(self: *Self, alloc: Allocator, size: usize) !void {
pub fn resize(self: *Self, alloc: Allocator, size: usize) Allocator.Error!void {
// Rotate to zero so it is aligned.
try self.rotateToZero(alloc);
@@ -116,7 +116,7 @@ pub fn CircBuf(comptime T: type, comptime default: T) type {
}
/// Rotate the data so that it is zero-aligned.
fn rotateToZero(self: *Self, alloc: Allocator) !void {
fn rotateToZero(self: *Self, alloc: Allocator) Allocator.Error!void {
// TODO: this does this in the worst possible way by allocating.
// rewrite to not allocate, its possible, I'm just lazy right now.