src/client/backup_repo.rs: impl. new()

This commit is contained in:
Dietmar Maurer 2019-12-19 08:44:38 +01:00
parent 94913f35ca
commit 25de1c8005
1 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,10 @@ pub struct BackupRepository {
impl BackupRepository {
pub fn new(user: Option<String>, host: Option<String>, store: String) -> Self {
Self { user, host, store }
}
pub fn user(&self) -> &str {
if let Some(ref user) = self.user {
return user;
@ -79,4 +83,3 @@ impl std::str::FromStr for BackupRepository {
})
}
}