mirror of
https://github.com/rclone/rclone.git
synced 2025-06-02 01:58:25 +08:00
build: fix errors spotted by ineffassign linter
These were mostly caused by shadowing err and a good fraction of them will have caused errors not to be propagated properly.
This commit is contained in:
@ -187,10 +187,10 @@ func TestVFSStatParent(t *testing.T) {
|
||||
assert.Equal(t, "/", node.Name())
|
||||
assert.Equal(t, "not found", leaf)
|
||||
|
||||
node, leaf, err = vfs.StatParent("not found dir/not found")
|
||||
_, _, err = vfs.StatParent("not found dir/not found")
|
||||
assert.Equal(t, os.ErrNotExist, err)
|
||||
|
||||
node, leaf, err = vfs.StatParent("file1/under a file")
|
||||
_, _, err = vfs.StatParent("file1/under a file")
|
||||
assert.Equal(t, os.ErrExist, err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user