forked from External/ergo
use maps.Clone from go1.21
This commit is contained in:
parent
28d9a7ff63
commit
f77d430d25
5 changed files with 8 additions and 14 deletions
|
|
@ -5,6 +5,7 @@ package irc
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
|
|
@ -515,7 +516,7 @@ func (client *Client) GetReadMarker(cfname string) (result string) {
|
|||
func (client *Client) copyReadMarkers() (result map[string]time.Time) {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
return utils.CopyMap(client.readMarkers)
|
||||
return maps.Clone(client.readMarkers)
|
||||
}
|
||||
|
||||
func (client *Client) SetReadMarker(cfname string, now time.Time) (result time.Time) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue