fix clippy warnings on util and rpc

This commit is contained in:
Trinity Pointard
2021-04-09 02:32:42 +02:00
committed by Alex Auvolat
parent 88925ebe22
commit f05bb111c2
9 changed files with 45 additions and 51 deletions
+3 -3
View File
@@ -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,