mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
remove unused inquire dependency
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
use std::process;
|
||||
|
||||
use clap::Parser;
|
||||
use color_eyre::Result;
|
||||
use email::{backend::feature::BackendFeatureSource, folder::delete::DeleteFolder};
|
||||
use inquire::Confirm;
|
||||
use std::process;
|
||||
use pimalaya_tui::prompt;
|
||||
use tracing::info;
|
||||
|
||||
use crate::{
|
||||
@@ -29,10 +30,9 @@ impl FolderDeleteCommand {
|
||||
|
||||
let folder = &self.folder.name;
|
||||
|
||||
let confirm = Confirm::new(&format!("Do you really want to delete the folder {folder}? All emails will be definitely deleted."))
|
||||
.with_default(false).prompt_skippable()?;
|
||||
let confirm = format!("Do you really want to delete the folder {folder}? All emails will be definitely deleted.");
|
||||
|
||||
if let Some(false) | None = confirm {
|
||||
if !prompt::bool(confirm, false)? {
|
||||
process::exit(0);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
use std::process;
|
||||
|
||||
use clap::Parser;
|
||||
use color_eyre::Result;
|
||||
use email::{backend::feature::BackendFeatureSource, folder::purge::PurgeFolder};
|
||||
use std::process;
|
||||
use pimalaya_tui::prompt;
|
||||
use tracing::info;
|
||||
|
||||
use crate::{
|
||||
@@ -28,11 +30,9 @@ impl FolderPurgeCommand {
|
||||
|
||||
let folder = &self.folder.name;
|
||||
|
||||
let confirm = inquire::Confirm::new(&format!("Do you really want to purge the folder {folder}? All emails will be definitely deleted."))
|
||||
.with_default(false)
|
||||
.prompt_skippable()?;
|
||||
let confirm = format!("Do you really want to purge the folder {folder}? All emails will be definitely deleted.");
|
||||
|
||||
if let Some(false) | None = confirm {
|
||||
if !prompt::bool(confirm, false)? {
|
||||
process::exit(0);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user