Remove redundant calls to builder_init
This commit is contained in:
1 parent
3dcc22fa6d
commit
f4212b60e7
1 file changed
-2
@@ -3044,7 +3044,6 @@ left_justify :: proc(str: string, length: int, pad: string, allocator := context
|
|||||||
pad_len := rune_count(pad)
|
pad_len := rune_count(pad)
|
||||||
|
|
||||||
b: Builder
|
b: Builder
|
||||||
builder_init(&b, allocator)
|
|
||||||
builder_init(&b, 0, len(str) + (remains/pad_len + 1)*len(pad), allocator) or_return
|
builder_init(&b, 0, len(str) + (remains/pad_len + 1)*len(pad), allocator) or_return
|
||||||
|
|
||||||
w := to_writer(&b)
|
w := to_writer(&b)
|
||||||
@@ -3079,7 +3078,6 @@ right_justify :: proc(str: string, length: int, pad: string, allocator := contex
|
|||||||
pad_len := rune_count(pad)
|
pad_len := rune_count(pad)
|
||||||
|
|
||||||
b: Builder
|
b: Builder
|
||||||
builder_init(&b, allocator)
|
|
||||||
builder_init(&b, 0, len(str) + (remains/pad_len + 1)*len(pad), allocator) or_return
|
builder_init(&b, 0, len(str) + (remains/pad_len + 1)*len(pad), allocator) or_return
|
||||||
|
|
||||||
w := to_writer(&b)
|
w := to_writer(&b)
|
||||||
|
|||||||
Reference in new issue
Block a user