Specifying two separate Path

Replacing single path `P` with `D: AsRef<Path>, W: AsRef<Path>`
master
Rohit Joshi 6 years ago committed by GitHub
parent e3aef69f38
commit 0a4cedc0a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/backup.rs

@ -92,10 +92,10 @@ impl BackupEngine {
/// error!("Failed to restore from the backup. Error:{:?}", e); /// error!("Failed to restore from the backup. Error:{:?}", e);
/// return Err(e.to_string()); /// return Err(e.to_string());
/// } /// }
pub fn restore_from_latest_backup<P: AsRef<Path>>( pub fn restore_from_latest_backup<D: AsRef<Path>, W: AsRef<Path>>(
&mut self, &mut self,
db_dir: P, db_dir: D,
wal_dir: P, wal_dir: W,
opts: &RestoreOptions, opts: &RestoreOptions,
) -> Result<(), Error> { ) -> Result<(), Error> {
let db_dir = db_dir.as_ref(); let db_dir = db_dir.as_ref();

Loading…
Cancel
Save