From b98693494e8f4b34f35107bdee60fb01d6ad8956 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Mon, 29 Apr 2019 11:57:18 +1000 Subject: [PATCH] ircmap: maps are always passed by ref lol, no need to do dis --- ircmap/istring.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ircmap/istring.go b/ircmap/istring.go index 411dda7..7f6ddda 100644 --- a/ircmap/istring.go +++ b/ircmap/istring.go @@ -102,14 +102,14 @@ func PrecisCasefold(str string) (string, error) { // mapping as defined by this package (or an error if the given string is not // valid in the chosen mapping). func Casefold(mapping MappingType, input string) (string, error) { - return CasefoldCustomChannelPrefixes(mapping, input, &ChannelPrefixes) + return CasefoldCustomChannelPrefixes(mapping, input, ChannelPrefixes) } // CasefoldCustomChannelPrefixes returns a string, lowercased/casefolded // according to the given mapping as defined by this package (or an error if // the given string is not valid in the chosen mapping), using a custom // channel prefix map. -func CasefoldCustomChannelPrefixes(mapping MappingType, input string, channelPrefixes *map[byte]bool) (string, error) { +func CasefoldCustomChannelPrefixes(mapping MappingType, input string, channelPrefixes map[byte]bool) (string, error) { var out string var err error @@ -126,7 +126,7 @@ func CasefoldCustomChannelPrefixes(mapping MappingType, input string, channelPre } else if mapping == RFC7613 { // skip channel prefixes to avoid bidi rule (as per spec) var start int - for start = 0; start < len(input) && (*channelPrefixes)[input[start]]; start++ { + for start = 0; start < len(input) && channelPrefixes[input[start]]; start++ { } lowered, err := PrecisCasefold(input[start:])