From b312c0e2f387270b31da10853eaa62d0bb94a21b Mon Sep 17 00:00:00 2001 From: Yves Biener Date: Sat, 6 Jun 2026 20:51:59 +0200 Subject: [PATCH] fix(lint): correct reported typos --- README.md | 2 +- src/iter.zig | 4 ++-- src/rope/sum-tree.zig | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 47356e4..548e30a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Implementation of a [rope datastructure](https://en.wikipedia.org/wiki/Rope_(dat Based on the MIT-Licensed implementation of noahbald: https://github.com/noahbald/noe -Please check out his excelent [write up](https://www.noahwbaldwin.me/blogs/writing-an-editor) about the implementation of an editor in zig. +Please check out his excellent [write up](https://www.noahwbaldwin.me/blogs/writing-an-editor) about the implementation of an editor in zig. Another great resource for ropes has been created by [Zed](https://zed.dev/blog/zed-decoded-rope-sumtree), it is worth reading to further understand the implementation details of this implementation. diff --git a/src/iter.zig b/src/iter.zig index 871c454..947f425 100644 --- a/src/iter.zig +++ b/src/iter.zig @@ -222,7 +222,7 @@ pub fn ParallelIter(T: type) type { self.sink = try gpa.alloc(T, self.impl.len()); if (self.poolSize == 0) { - return; // Assume threads are unavailable, complete syncronously + return; // Assume threads are unavailable, complete synchronously } else { for (self.pool) |*thread| { thread.* = try std.Thread.spawn(.{}, threadHandle, .{&self}); @@ -232,7 +232,7 @@ pub fn ParallelIter(T: type) type { pub fn join(self: *Self) []T { if (self.pool.len == 0) { - // Assume threads are unavailable, complete syncronously + // Assume threads are unavailable, complete synchronously while (true) { self.handle() orelse break; } diff --git a/src/rope/sum-tree.zig b/src/rope/sum-tree.zig index d6d0026..e1bfd51 100644 --- a/src/rope/sum-tree.zig +++ b/src/rope/sum-tree.zig @@ -178,7 +178,7 @@ pub fn SumTree(comptime T: type) type { }; } - /// Returns the number of generations withing the current node. + /// Returns the number of generations within the current node. pub fn height(self: *const Self) usize { return switch (self.*) { .internal => |internal| internal.height, @@ -299,7 +299,7 @@ pub fn SumTree(comptime T: type) type { self.checkInvariants(context); return null; } - // Otherwise, create a new node and propogate to parent + // Otherwise, create a new node and propagate to parent const newInternal = try gpa.create(Self); newInternal.* = .{ .internal = .{ .height = internal.height,