Optimize text attributes

We can apply same restrictions as for other attributes and
use raw subslice directly.
This commit is contained in:
Aleksandr Razumov
2019-06-04 16:29:09 +03:00
parent 930f124284
commit 68274f5d3d

View File

@@ -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
}