dirlist: remove not needed sort function
The docs of strings.Compare state: > Compare is included only for symmetry with package bytes. It is usually > clearer and always faster to use the built-in string comparison operators > ==, <, >, and so on. So let's do that.
This commit is contained in:
parent
e78b7b85e4
commit
2a3d120d6f
|
@ -5,7 +5,6 @@ import (
|
|||
"log"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/mattn/go-runewidth"
|
||||
|
@ -316,7 +315,7 @@ func (dirlist *DirectoryList) sortDirsByFoldersSortConfig() {
|
|||
if jInFoldersSort >= 0 {
|
||||
return false
|
||||
}
|
||||
return strings.Compare(dirlist.dirs[i], dirlist.dirs[j]) == -1
|
||||
return dirlist.dirs[i] < dirlist.dirs[j]
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue