From b4fb9f925075ab546fd7399eb777ae133ccb5ab3 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Fri, 21 May 2021 13:35:07 +0900 Subject: [PATCH] client, server: new CIDRs must be hostname-compatible towards the goal of supporting #82 --- shared/src/prompts.rs | 2 +- shared/src/types.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/src/prompts.rs b/shared/src/prompts.rs index eb07938..1e8a320 100644 --- a/shared/src/prompts.rs +++ b/shared/src/prompts.rs @@ -39,7 +39,7 @@ pub fn add_cidr(cidrs: &[Cidr], request: &AddCidrOpts) -> Result, + pub name: Option, /// The CIDR network (eg. "10.42.5.0/24") #[structopt(long)] @@ -581,7 +581,7 @@ impl FromStr for Hostname { if Self::is_valid(name) { Ok(Self(name.to_string())) } else { - Err("invalid hostname") + Err("invalid hostname string (only alphanumeric with dashes)") } } }