aboutsummaryrefslogtreecommitdiff
path: root/src/util/persister.rs
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-04-09 02:32:42 +0200
committerAlex Auvolat <alex@adnab.me>2021-05-03 22:11:41 +0200
commitf05bb111c2e7dd77f2b34b82892bbfa8e6a063c1 (patch)
tree0e093982ad6e30a440dcdbd9d8e47c4e75b9d198 /src/util/persister.rs
parent88925ebe2210a8382b4d353fcab15d2b5c345efb (diff)
downloadgarage-f05bb111c2e7dd77f2b34b82892bbfa8e6a063c1.tar.gz
garage-f05bb111c2e7dd77f2b34b82892bbfa8e6a063c1.zip
fix clippy warnings on util and rpc
Diffstat (limited to 'src/util/persister.rs')
-rw-r--r--src/util/persister.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/persister.rs b/src/util/persister.rs
index 93b7cdf4..9e1a1910 100644
--- a/src/util/persister.rs
+++ b/src/util/persister.rs
@@ -1,5 +1,5 @@
use std::io::{Read, Write};
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
@@ -18,8 +18,8 @@ impl<T> Persister<T>
where
T: Serialize + for<'de> Deserialize<'de>,
{
- pub fn new(base_dir: &PathBuf, file_name: &str) -> Self {
- let mut path = base_dir.clone();
+ pub fn new(base_dir: &Path, file_name: &str) -> Self {
+ let mut path = base_dir.to_path_buf();
path.push(file_name);
Self {
path,