Fixes the clippy lint
```
warning: the borrowed expression implements the required traits
--> src/medium.rs:143:9
|
143 | &statefile(base),
| ^^^^^^^^^^^^^^^^ help: change this to: `statefile(base)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
```
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
// Helper to write statefile
fn write_state(_lock: &ConfigLockGuard, base: &Path, state: &MediumState) -> Result<(), Error> {
replace_file(
- &statefile(base),
+ statefile(base),
&serde_json::to_vec(&state)?,
CreateOptions::default(),
true,
pub(crate) fn lock(&self) -> Result<PoolLockGuard, Error> {
let timeout = std::time::Duration::new(30, 0);
let lock = Some(proxmox_sys::fs::open_file_locked(
- &self.lock_path(),
+ self.lock_path(),
timeout,
true,
CreateOptions::default(),