rename BackupDir::new_with_group to BackupDir::with_group
This commit is contained in:
parent
bc871bd19d
commit
d09db6c2e9
|
@ -114,7 +114,7 @@ async move {
|
|||
}
|
||||
|
||||
let last_backup = BackupInfo::last_backup(&datastore.base_path(), &backup_group, true).unwrap_or(None);
|
||||
let backup_dir = BackupDir::new_with_group(backup_group.clone(), backup_time)?;
|
||||
let backup_dir = BackupDir::with_group(backup_group.clone(), backup_time)?;
|
||||
|
||||
let _last_guard = if let Some(last) = &last_backup {
|
||||
if backup_dir.backup_time() <= last.backup_dir.backup_time() {
|
||||
|
|
|
@ -213,7 +213,7 @@ impl BackupDir {
|
|||
U: Into<String>,
|
||||
{
|
||||
let group = BackupGroup::new(backup_type.into(), backup_id.into());
|
||||
BackupDir::new_with_group(group, backup_time)
|
||||
BackupDir::with_group(group, backup_time)
|
||||
}
|
||||
|
||||
pub fn with_rfc3339<T,U,V>(backup_type: T, backup_id: U, backup_time_string: V) -> Result<Self, Error>
|
||||
|
@ -228,7 +228,7 @@ impl BackupDir {
|
|||
Ok(Self { group, backup_time, backup_time_string })
|
||||
}
|
||||
|
||||
pub fn new_with_group(group: BackupGroup, backup_time: i64) -> Result<Self, Error> {
|
||||
pub fn with_group(group: BackupGroup, backup_time: i64) -> Result<Self, Error> {
|
||||
let backup_time_string = Self::backup_time_to_string(backup_time)?;
|
||||
Ok(Self { group, backup_time, backup_time_string })
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue