src/bin/proxmox-backup-client.rs: minor code cleanup

This commit is contained in:
Dietmar Maurer 2019-02-27 07:21:57 +01:00
parent 9bc3ddb822
commit 25f1650b71

View File

@ -223,6 +223,12 @@ fn main() {
.into() .into()
); );
let backup_source_schema: Arc<Schema> = Arc::new(
StringSchema::new("Backup source specification ([<label>:<path>]).")
.format(Arc::new(ApiStringFormat::Pattern(&BACKUPSPEC_REGEX)))
.into()
);
let create_cmd_def = CliCommand::new( let create_cmd_def = CliCommand::new(
ApiMethod::new( ApiMethod::new(
create_backup, create_backup,
@ -232,9 +238,7 @@ fn main() {
"backupspec", "backupspec",
ArraySchema::new( ArraySchema::new(
"List of backup source specifications ([<label>:<path>] ...)", "List of backup source specifications ([<label>:<path>] ...)",
StringSchema::new("Directory source specification ([<label>:<path>]).") backup_source_schema,
.format(Arc::new(ApiStringFormat::Pattern(&BACKUPSPEC_REGEX)))
.into()
).min_length(1) ).min_length(1)
) )
.optional( .optional(