From 68274f5d3d3a9dcc278f66193a519ff9834098c8 Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Tue, 4 Jun 2019 16:29:09 +0300 Subject: [PATCH] Optimize text attributes We can apply same restrictions as for other attributes and use raw subslice directly. --- textattrs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/textattrs.go b/textattrs.go index 69ca58a..efdfbd9 100644 --- a/textattrs.go +++ b/textattrs.go @@ -124,6 +124,6 @@ func (v *TextAttribute) GetFromAs(m *Message, t AttrType) error { if err != nil { return err } - *v = append((*v)[:0], a...) + *v = a return nil }