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.
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:
Non-consuming options, while requiring 1 more line in the simplest case, are more flexible.
While I'm here, remove some extraneous clone()s.