Simplify code
This commit is contained in:
parent
4713cc29ad
commit
59c32d19cc
1 changed files with 2 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/kovidgoyal/kitty/tools/tui/loop"
|
||||
|
|
@ -37,12 +38,7 @@ func (self *Input) has_mime_matching(predicate func(string) bool) bool {
|
|||
if predicate(self.mime_type) {
|
||||
return true
|
||||
}
|
||||
for _, i := range self.extra_mime_types {
|
||||
if predicate(i) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return slices.ContainsFunc(self.extra_mime_types, predicate)
|
||||
}
|
||||
|
||||
func write_loop(inputs []*Input, opts *Options) (err error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue