mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-08 13:07:43 +00:00
State: Fixed a data race for (*DefaultStore).Messages()
This commit is contained in:
parent
9e33386546
commit
eb09447323
|
@ -436,7 +436,9 @@ func (s *DefaultStore) Messages(channelID discord.Snowflake) ([]discord.Message,
|
||||||
return nil, ErrStoreNotFound
|
return nil, ErrStoreNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
return ms, nil
|
cp := make([]discord.Message, len(ms))
|
||||||
|
copy(cp, ms)
|
||||||
|
return cp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DefaultStore) MaxMessages() int {
|
func (s *DefaultStore) MaxMessages() int {
|
||||||
|
|
Loading…
Reference in a new issue