{client,server}: hide innernet-server CIDR from selection menus

It's a special /32 CIDR that is un-interactable, so is only taking
up space.

Closes #63
pull/67/head
Jake McGinty 2021-05-04 11:34:16 +09:00
parent a7f35ee12b
commit f18fe14553
1 changed files with 1 additions and 0 deletions

View File

@ -77,6 +77,7 @@ pub fn add_cidr(cidrs: &[Cidr], request: &AddCidrOpts) -> Result<Option<CidrCont
pub fn choose_cidr<'a>(cidrs: &'a [Cidr], text: &'static str) -> Result<&'a Cidr, Error> {
let cidr_names: Vec<_> = cidrs
.iter()
.filter(|cidr| cidr.name != "innernet-server")
.map(|cidr| format!("{} ({})", &cidr.name, &cidr.cidr))
.collect();
let cidr_index = Select::with_theme(&*THEME)