summaryrefslogtreecommitdiff
path: root/src/DisplayWidth.zig
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-03-27 21:52:02 -0400
committerGravatar Jose Colon Rodriguez2024-03-27 21:52:02 -0400
commit4ce891a8ce5336da39180964792110e131756cdd (patch)
treeb4ff0180157bb49e15d2c36f2cf0cdaab1a24535 /src/DisplayWidth.zig
parentFriendly general category methods (diff)
downloadzg-4ce891a8ce5336da39180964792110e131756cdd.tar.gz
zg-4ce891a8ce5336da39180964792110e131756cdd.tar.xz
zg-4ce891a8ce5336da39180964792110e131756cdd.zip
ScriptsData and made all Datas const
Diffstat (limited to 'src/DisplayWidth.zig')
-rw-r--r--src/DisplayWidth.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/DisplayWidth.zig b/src/DisplayWidth.zig
index 8d5eb0f..e547adf 100644
--- a/src/DisplayWidth.zig
+++ b/src/DisplayWidth.zig
@@ -56,7 +56,7 @@ pub fn strWidth(self: Self, str: []const u8) usize {
56} 56}
57 57
58test "strWidth" { 58test "strWidth" {
59 var data = try DisplayWidthData.init(testing.allocator); 59 const data = try DisplayWidthData.init(testing.allocator);
60 defer data.deinit(); 60 defer data.deinit();
61 const self = Self{ .data = &data }; 61 const self = Self{ .data = &data };
62 62
@@ -157,7 +157,7 @@ pub fn center(
157 157
158test "center" { 158test "center" {
159 const allocator = testing.allocator; 159 const allocator = testing.allocator;
160 var data = try DisplayWidthData.init(allocator); 160 const data = try DisplayWidthData.init(allocator);
161 defer data.deinit(); 161 defer data.deinit();
162 const self = Self{ .data = &data }; 162 const self = Self{ .data = &data };
163 163
@@ -236,7 +236,7 @@ pub fn padLeft(
236 236
237test "padLeft" { 237test "padLeft" {
238 const allocator = testing.allocator; 238 const allocator = testing.allocator;
239 var data = try DisplayWidthData.init(allocator); 239 const data = try DisplayWidthData.init(allocator);
240 defer data.deinit(); 240 defer data.deinit();
241 const self = Self{ .data = &data }; 241 const self = Self{ .data = &data };
242 242
@@ -286,7 +286,7 @@ pub fn padRight(
286 286
287test "padRight" { 287test "padRight" {
288 const allocator = testing.allocator; 288 const allocator = testing.allocator;
289 var data = try DisplayWidthData.init(allocator); 289 const data = try DisplayWidthData.init(allocator);
290 defer data.deinit(); 290 defer data.deinit();
291 const self = Self{ .data = &data }; 291 const self = Self{ .data = &data };
292 292
@@ -339,7 +339,7 @@ pub fn wrap(
339 339
340test "wrap" { 340test "wrap" {
341 const allocator = testing.allocator; 341 const allocator = testing.allocator;
342 var data = try DisplayWidthData.init(allocator); 342 const data = try DisplayWidthData.init(allocator);
343 defer data.deinit(); 343 defer data.deinit();
344 const self = Self{ .data = &data }; 344 const self = Self{ .data = &data };
345 345