mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-16 15:23:48 -05:00
Code cleanup (#1640)
- Replaced time.Now().Sub() with time.Since() - Replaced unnecessary string/byte slice conversions - Removed obsolete return and value assignment in range loop
This commit is contained in:
committed by
Junegunn Choi
parent
7322504ad0
commit
a1260feeed
@@ -207,13 +207,13 @@ func (m *Matcher) scan(request MatchRequest) (*Merger, bool) {
|
||||
return nil, wait()
|
||||
}
|
||||
|
||||
if time.Now().Sub(startedAt) > progressMinDuration {
|
||||
if time.Since(startedAt) > progressMinDuration {
|
||||
m.eventBox.Set(EvtSearchProgress, float32(count)/float32(numChunks))
|
||||
}
|
||||
}
|
||||
|
||||
partialResults := make([][]Result, numSlices)
|
||||
for _ = range slices {
|
||||
for range slices {
|
||||
partialResult := <-resultChan
|
||||
partialResults[partialResult.index] = partialResult.matches
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user