1
0
Fork 0
forked from External/ergo

use maps.Clone from go1.21

This commit is contained in:
Shivaram Lingamneni 2023-08-15 20:57:52 -04:00
parent 28d9a7ff63
commit f77d430d25
5 changed files with 8 additions and 14 deletions

View file

@ -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) {