From 4e8d0a8d25e21d642a7a4a378700bd928482fd72 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Thu, 22 Jun 2023 20:23:13 +0200 Subject: [PATCH] refactor: we go rusty --- src/backup/manager.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backup/manager.rs b/src/backup/manager.rs index 1dfec16..5d2f1a3 100644 --- a/src/backup/manager.rs +++ b/src/backup/manager.rs @@ -25,18 +25,18 @@ where const METADATA_FILE: &str = "alex.json"; /// Initialize a new instance of a `BackupManager`. - pub fn new( - backup_dir: PathBuf, - config_dir: PathBuf, - world_dir: PathBuf, + pub fn new, P2: Into, P3: Into>( + backup_dir: P1, + config_dir: P2, + world_dir: P3, metadata: T, chain_len: u64, chains_to_keep: u64, ) -> Self { Self { - backup_dir, - config_dir, - world_dir, + backup_dir: backup_dir.into(), + config_dir: config_dir.into(), + world_dir: world_dir.into(), default_metadata: metadata, chain_len, chains_to_keep,