Remove a method from the TreeDirNode class
The "TreeDirNode.getDirChildren()" method is never called and can be safely removed. Further, note that this method has a bug. It calls the "filter()" builtin function, which modifies "self.children" in-place. This is obviously not a desirable side effect of calling this function. If the functionality is genuinely required later, "filter()" should be called on a copy of "self.children" to achieve the desired result.
This commit is contained in:
parent
a3fdf1e3c1
commit
3245007f0e
@ -220,13 +220,6 @@ function! s:TreeDirNode.getChildIndex(path)
|
||||
return -1
|
||||
endfunction
|
||||
|
||||
" FUNCTION: TreeDirNode.getDirChildren() {{{1
|
||||
" Return a list of all child nodes from "self.children" that are of type
|
||||
" TreeDirNode.
|
||||
function! s:TreeDirNode.getDirChildren()
|
||||
return filter(self.children, 'v:val.path.isDirectory == 1')
|
||||
endfunction
|
||||
|
||||
" FUNCTION: TreeDirNode._glob(pattern, all) {{{1
|
||||
" Return a list of strings naming the descendants of the directory in this
|
||||
" TreeDirNode object that match the specified glob pattern.
|
||||
|
Loading…
Reference in New Issue
Block a user