fix: remove unused constants, fix inefficient assign

This commit is contained in:
Carlos Alexandro Becker
2025-07-28 16:30:35 -03:00
parent 712f72c847
commit ebc180b3ab
2 changed files with 1 additions and 7 deletions

View File

@@ -5,13 +5,12 @@ package watcher
import "syscall"
func Ulimit() (uint64, error) {
var currentLimit uint64 = 0
var rLimit syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return 0, err
}
currentLimit = rLimit.Cur
currentLimit := rLimit.Cur
rLimit.Cur = rLimit.Max / 10 * 8
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {

View File

@@ -71,11 +71,6 @@ type completionsCmp struct {
query string // The current filter query
}
const (
maxCompletionsWidth = 80 // Maximum width for the completions popup
minCompletionsWidth = 20 // Minimum width for the completions popup
)
func New() Completions {
completionsKeyMap := DefaultKeyMap()
keyMap := list.DefaultKeyMap()