From d5da06e33dd8fd16e3e3dbc7d27a2eb90fc47ac0 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Tue, 1 Mar 2022 19:02:23 +0100 Subject: [PATCH] refactor: remove redundant length property --- src/engine/block.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/engine/block.go b/src/engine/block.go index 62e9a2c3..3c3ff296 100644 --- a/src/engine/block.go +++ b/src/engine/block.go @@ -41,7 +41,6 @@ type Block struct { ansi *color.Ansi activeSegment *Segment previousActiveSegment *Segment - length int } func (b *Block) init(env environment.Environment, writer color.Writer, ansi *color.Ansi) { @@ -178,7 +177,7 @@ func (b *Block) debug() (int, []*SegmentTiming) { segmentTiming.text = segment.text if segmentTiming.active { b.renderSegment(segment) - segmentTiming.text, b.length = b.writer.String() + segmentTiming.text, _ = b.writer.String() b.writer.Reset() } segmentTiming.duration = time.Since(start)