Skip to content

Commit 8ced2c5

Browse files
committed
cgofuse: use generic.Closer wrapper
1 parent aed7bbd commit 8ced2c5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

internal/filesystem/cgofuse/host.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
)
2121

2222
type (
23-
closer func() error
2423
// Host is the cgofuse specific parameters
2524
// of a mount point.
2625
Host struct {
@@ -53,8 +52,6 @@ const (
5352
mountedFilePath = string(os.PathSeparator) + mountedFileName
5453
)
5554

56-
func (close closer) Close() error { return close() }
57-
5855
func (mh *Host) HostID() filesystem.Host { return HostID }
5956

6057
func (mh *Host) ParseField(key, value string) error {
@@ -170,7 +167,7 @@ func (mh *Host) Mount(fsys fs.FS) (io.Closer, error) {
170167
if err := doMount(fuseHost, target, args); err != nil {
171168
return nil, err
172169
}
173-
return closer(func() error {
170+
return generic.Closer(func() error {
174171
if fuseHost.Unmount() {
175172
mh.sysquirks.unmount()
176173
return nil

0 commit comments

Comments
 (0)