From d7542ec504e63d1d52727504d2307dbafb2502ee Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 24 Dec 2024 12:07:58 -0800 Subject: [PATCH] terminal: address typos in style struct --- src/terminal/style.zig | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/terminal/style.zig b/src/terminal/style.zig index 24b3a19dd..b58a33196 100644 --- a/src/terminal/style.zig +++ b/src/terminal/style.zig @@ -240,13 +240,15 @@ pub const Style = struct { } /// `PackedStyle` represents the same data as `Style` but without padding, - /// which is necassary for hashing via re-interpretation of the underlying bytes. + /// which is necessary for hashing via re-interpretation of the underlying + /// bytes. /// - /// `Style` is still prefered for everything else as it has type-safety when using - /// the `Color` tagged union. + /// `Style` is still preferred for everything else as it has type-safety + /// when using the `Color` tagged union. /// - /// Empirical testing shows that storing all of the tags first and then the datas - /// provides a better layout for serializing into and is faster on benchmarks. + /// Empirical testing shows that storing all of the tags first and then the + /// data provides a better layout for serializing into and is faster on + /// benchmarks. const PackedStyle = packed struct(u128) { tags: packed struct { fg: Color.Tag, @@ -261,10 +263,12 @@ pub const Style = struct { flags: Flags, _padding: u16 = 0, - /// After https://github.com/ziglang/zig/issues/19754 is implemented, it - /// will be an compiler-error to have packed union fields of differing size. + /// After https://github.com/ziglang/zig/issues/19754 is implemented, + /// it will be an compiler-error to have packed union fields of + /// differing size. /// - /// For now we just need to be careful not to accidentally introduce padding. + /// For now we just need to be careful not to accidentally introduce + /// padding. const Data = packed union { none: u24, palette: packed struct(u24) {