mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
fix rustfmt
This commit is contained in:
parent
4250bb210e
commit
bec4d7cbb9
@ -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};
|
||||
|
||||
|
||||
@ -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) => {
|
||||
|
||||
@ -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) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user