mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
fix: remove unused constants, fix inefficient assign
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user