From db4868ef4fbcb279b500c6d1af1e90d77a883e47 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 14 Feb 2019 11:17:08 +0100 Subject: [PATCH] src/client/backup_repo.rs - improve docu --- src/client/backup_repo.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/backup_repo.rs b/src/client/backup_repo.rs index 0d88f0e5..24d27380 100644 --- a/src/client/backup_repo.rs +++ b/src/client/backup_repo.rs @@ -7,9 +7,10 @@ use lazy_static::lazy_static; use regex::Regex; lazy_static! { - // user@host:datastore + /// Regular expression to parse repository URLs pub static ref BACKUP_REPO_URL_REGEX: Regex = Regex::new(r"^(?:(?:([\w@]+)@)?(\w+):)?(\w+)$").unwrap(); + /// API schema format definition for repository URLs pub static ref BACKUP_REPO_URL: Arc = ApiStringFormat::Pattern(&BACKUP_REPO_URL_REGEX).into(); } @@ -29,7 +30,7 @@ pub struct BackupRepository { impl BackupRepository { - /// Parse a repository string. + /// Parse a repository URL. /// /// This parses strings like `user@host:datastore`. The `user` and /// `host` parts are optional, where `host` defaults to the local