ref(examples): avoid unnecessary casts
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
This commit is contained in:
@@ -34,8 +34,8 @@ pub const Clickable = struct {
|
||||
_ = ctx;
|
||||
std.debug.assert(cells.len == @as(usize, size.cols) * @as(usize, size.rows));
|
||||
|
||||
const row: u16 = size.rows / 2 -| @as(u16, @truncate(text.len / 2));
|
||||
const col: u16 = size.cols / 2 -| @as(u16, @truncate(text.len / 2));
|
||||
const row = size.rows / 2 -| (text.len / 2);
|
||||
const col = size.cols / 2 -| (text.len / 2);
|
||||
const anchor = (row * size.cols) + col;
|
||||
|
||||
for (text, 0..) |cp, idx| {
|
||||
|
||||
Reference in New Issue
Block a user