mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
Remove unused Append()
This commit is contained in:
parent
bac1323fe0
commit
b500e2f628
14
buffer.go
14
buffer.go
|
|
@ -35,10 +35,6 @@ func NewFilteredBuffer(src Buffer, page, perPage int) *FilteredBuffer {
|
|||
return &fb
|
||||
}
|
||||
|
||||
func (flb *FilteredBuffer) Append(l line.Line) (line.Line, error) {
|
||||
return l, nil
|
||||
}
|
||||
|
||||
// LineAt returns the line at index `i`. Note that the i-th element
|
||||
// in this filtered buffer may actually correspond to a totally
|
||||
// different line number in the source buffer.
|
||||
|
|
@ -60,16 +56,6 @@ func NewMemoryBuffer() *MemoryBuffer {
|
|||
return mb
|
||||
}
|
||||
|
||||
func (mb *MemoryBuffer) Append(l line.Line) {
|
||||
mb.mutex.Lock()
|
||||
defer mb.mutex.Unlock()
|
||||
bufferAppend(&mb.lines, l)
|
||||
}
|
||||
|
||||
func bufferAppend(lines *[]line.Line, l line.Line) {
|
||||
*lines = append(*lines, l)
|
||||
}
|
||||
|
||||
func (mb *MemoryBuffer) Size() int {
|
||||
mb.mutex.RLock()
|
||||
defer mb.mutex.RUnlock()
|
||||
|
|
|
|||
7
query.go
7
query.go
|
|
@ -62,13 +62,6 @@ func (q *Query) Len() int {
|
|||
return len(q.query)
|
||||
}
|
||||
|
||||
func (q *Query) Append(r rune) {
|
||||
q.mutex.Lock()
|
||||
defer q.mutex.Unlock()
|
||||
|
||||
q.query = append(q.query, r)
|
||||
}
|
||||
|
||||
// Runes returns a channel that gives you the list of runes in the query
|
||||
func (q *Query) Runes() <-chan rune {
|
||||
q.mutex.Lock()
|
||||
|
|
|
|||
Loading…
Reference in a new issue