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
1 changed files with 1 additions and 2 deletions
|
@ -5,7 +5,6 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/gdamore/tcell"
|
"github.com/gdamore/tcell"
|
||||||
"github.com/mattn/go-runewidth"
|
"github.com/mattn/go-runewidth"
|
||||||
|
@ -316,7 +315,7 @@ func (dirlist *DirectoryList) sortDirsByFoldersSortConfig() {
|
||||||
if jInFoldersSort >= 0 {
|
if jInFoldersSort >= 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return strings.Compare(dirlist.dirs[i], dirlist.dirs[j]) == -1
|
return dirlist.dirs[i] < dirlist.dirs[j]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue