From 77bbef01943a604fc09e9a422126154988846289 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 5 Feb 2026 10:39:59 +0000 Subject: perf: Reduce allocations and syscalls in formatting pipeline --- formatter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'formatter.go') diff --git a/formatter.go b/formatter.go index 3d4e873..0256694 100644 --- a/formatter.go +++ b/formatter.go @@ -33,7 +33,7 @@ func (f *Formatter) Format(source []byte, filename string) ([]byte, error) { formattingEngine := &engine.Engine{CommentMode: MapCommentMode(f.CommentMode)} - return []byte(formattingEngine.FormatToString(events)), nil + return formattingEngine.FormatToBytes(events), nil } func analyzeSource(source []byte, filename string) ([]byte, []engine.LineEvent, error) { -- cgit v1.2.3