Sherlock-Holo / fuse3

an async version fuse library for rust
MIT License
83 stars 17 forks source link

Use no-consuming methods for MountOptions #31

Closed asomers closed 2 years ago

asomers commented 2 years ago

The consuming methods make for a nice compact syntax - as long as the programmer knows exactly which methods will be needed. But if some mount options depend on runtime options then the consuming methods are awkward:

let mut opts = MountOptions::default();
if let Some(foo) = cli.bar {
    opts = opts.custom_options(foo)
}

Non-consuming options, while requiring 1 more line in the simplest case, are more flexible.

While I'm here, remove some extraneous clone()s.