fix rustfmt

This commit is contained in:
Alexander Weiss 2023-06-26 09:04:56 +02:00
parent 4250bb210e
commit bec4d7cbb9
3 changed files with 11 additions and 9 deletions

View File

@ -9,6 +9,7 @@ use std::{
use bytes::Bytes;
use log::{debug, error, info};
use dialoguer::Password;
use nom::{
branch::alt,
bytes::complete::{is_not, tag},
@ -18,7 +19,6 @@ use nom::{
sequence::delimited,
IResult,
};
use dialoguer::Password;
use serde_with::{serde_as, DisplayFromStr};

View File

@ -80,10 +80,11 @@ pub(crate) fn save_config(
let key = Key::new();
let pass = password.map_or_else(
|| match Password::new().with_prompt("enter password for new key")
.allow_empty_password(true)
.with_confirmation("confirm password", "passwords do not match")
.interact()
|| match Password::new()
.with_prompt("enter password for new key")
.allow_empty_password(true)
.with_confirmation("confirm password", "passwords do not match")
.interact()
{
Ok(it) => it,
Err(err) => {

View File

@ -79,10 +79,11 @@ impl AddCmd {
let key = repo.key;
let pass = self.new_password_file.as_ref().map_or_else(
|| match Password::new().with_prompt("enter password for new key")
.allow_empty_password(true)
.with_confirmation("confirm password", "passwords do not match")
.interact()
|| match Password::new()
.with_prompt("enter password for new key")
.allow_empty_password(true)
.with_confirmation("confirm password", "passwords do not match")
.interact()
{
Ok(it) => it,
Err(err) => {