From 3f5f8fad2c1b669c55c92c282c3e5b7d33d0c6a8 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Mon, 27 Jan 2025 19:58:43 -0500 Subject: [PATCH] Removed unnecessary functions (using `staticcheck`) --- misc.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/misc.go b/misc.go index 9e0f73a..690eba0 100644 --- a/misc.go +++ b/misc.go @@ -54,16 +54,6 @@ func assert(cond bool) { } } -func deleteFromSlice[T comparable](slc []T, val T) []T { - toReturn := make([]T, 0, len(slc)) - for _, v := range slc { - if v != val { - toReturn = append(toReturn, v) - } - } - return toReturn -} - // Ensure that the given elements are only appended to the given slice if they // don't already exist. Returns the new slice, and the number of unique items appended. func unique_append[T comparable](slc []T, items ...T) ([]T, int) { @@ -149,13 +139,6 @@ func allCases(r rune) []rune { return []rune{unicode.ToLower(r), unicode.ToUpper(r), unicode.ToTitle(r)} } -// Expands a slice to the given length -func expandSlice[T any](slc []T, newSize int) []T { - toRet := make([]T, newSize) - copy(toRet, slc) - return toRet -} - func isHex(c rune) bool { return slices.Contains([]rune("0123456789abcdefABCDEF"), c) }