From 0feb34690ea0271ef328ff4e1c4f86f55acbcf0f Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Sat, 10 Apr 2021 16:03:39 +0900 Subject: [PATCH] client: small cleanups --- client/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/main.rs b/client/src/main.rs index e29d36a..1a498d8 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -1,5 +1,5 @@ use colored::*; -use dialoguer::{theme::ColorfulTheme, Confirm, Input}; +use dialoguer::{Confirm, Input}; use hostsfile::HostsBuilder; use indoc::printdoc; use shared::{ @@ -182,11 +182,10 @@ fn update_hosts_file( } fn install(invite: &Path, hosts_file: Option) -> Result<(), Error> { - let theme = ColorfulTheme::default(); shared::ensure_dirs_exist(&[*CLIENT_CONFIG_PATH])?; let mut config = InterfaceConfig::from_file(invite)?; - let iface = Input::with_theme(&theme) + let iface = Input::with_theme(&*prompts::THEME) .with_prompt("Interface name") .default(config.interface.network_name.clone()) .interact()?; @@ -246,7 +245,7 @@ fn install(invite: &Path, hosts_file: Option) -> Result<(), Error> { fetch(&iface, false, hosts_file)?; - if Confirm::with_theme(&theme) + if Confirm::with_theme(&*prompts::THEME) .with_prompt(&format!( "Delete invitation file \"{}\" now? (It's no longer needed)", invite.to_string_lossy().yellow()