mirror of
https://github.com/gortc/stun.git
synced 2025-09-26 20:41:36 +08:00
Optimize text attributes
We can apply same restrictions as for other attributes and use raw subslice directly.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user