mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-18 05:47:54 +08:00
chore: cargo fmt
This commit is contained in:
@@ -21,13 +21,13 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Parser;
|
||||
use mail_parser::{MessageParser, MimeHeaders};
|
||||
use pimalaya_cli::printer::Printer;
|
||||
|
||||
use crate::shared::{
|
||||
attachments::list::{mime_string, Attachment, AttachmentColors, Attachments},
|
||||
attachments::list::{Attachment, AttachmentColors, Attachments, mime_string},
|
||||
client::EmailClient,
|
||||
mailboxes::arg::MailboxArg,
|
||||
};
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
use std::fmt;
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Parser;
|
||||
use comfy_table::{Cell, Color, ContentArrangement, Row, Table};
|
||||
use humansize::{format_size, BINARY};
|
||||
use humansize::{BINARY, format_size};
|
||||
use mail_parser::{MessageParser, MessagePart, MimeHeaders};
|
||||
use pimalaya_cli::printer::Printer;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -21,7 +21,7 @@ use anyhow::Result;
|
||||
use chrono::{DateTime, FixedOffset, Local};
|
||||
use clap::Parser;
|
||||
use comfy_table::{Cell, Color, ContentArrangement, Row, Table};
|
||||
use humansize::{format_size, BINARY};
|
||||
use humansize::{BINARY, format_size};
|
||||
use io_email::{address::Address, envelope::Envelope, flag::Flag};
|
||||
use pimalaya_cli::printer::Printer;
|
||||
use serde::Serialize;
|
||||
@@ -184,7 +184,9 @@ impl fmt::Display for Envelopes {
|
||||
let mut row = Row::new();
|
||||
row.max_height(1);
|
||||
row.add_cell(Cell::new(&env.id).fg(self.colors.id));
|
||||
row.add_cell(Cell::new(format_flags(&env.flags, &self.chars)).fg(self.colors.flags));
|
||||
row.add_cell(
|
||||
Cell::new(format_flags(&env.flags, &self.chars)).fg(self.colors.flags),
|
||||
);
|
||||
if self.with_attachment {
|
||||
row.add_cell(
|
||||
Cell::new(format_attachment(env.has_attachment, self.chars.attachment))
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use anyhow::{Result, anyhow};
|
||||
use clap::Parser;
|
||||
|
||||
use crate::account::context::Account;
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{
|
||||
io::{stdin, IsTerminal, Read},
|
||||
io::{IsTerminal, Read, stdin},
|
||||
path::PathBuf,
|
||||
};
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Parser;
|
||||
use io_email::flag::Flag;
|
||||
use pimalaya_cli::printer::Message;
|
||||
|
||||
@@ -29,15 +29,15 @@
|
||||
//! external command and never go through this module.
|
||||
|
||||
use std::{
|
||||
io::{stdin, IsTerminal, Read as _},
|
||||
io::{IsTerminal, Read as _, stdin},
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use anyhow::{Result, anyhow};
|
||||
use clap::ValueEnum;
|
||||
use mail_builder::{
|
||||
headers::{address::Address, raw::Raw},
|
||||
MessageBuilder,
|
||||
headers::{address::Address, raw::Raw},
|
||||
};
|
||||
use mail_parser::{HeaderValue, MessageParser};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Parser;
|
||||
use pimalaya_cli::printer::Printer;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Parser;
|
||||
use pimalaya_cli::printer::Printer;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use anyhow::{anyhow, bail, Result};
|
||||
use anyhow::{Result, anyhow, bail};
|
||||
use clap::Parser;
|
||||
use percent_encoding::percent_decode_str;
|
||||
use pimalaya_cli::printer::Printer;
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
//! `Sent` mailbox. With neither flag, the raw bytes are written to
|
||||
//! stdout — same shape as a manual `mml compile > out.eml`.
|
||||
|
||||
use std::io::{stdout, Write};
|
||||
use std::io::{Write, stdout};
|
||||
|
||||
use anyhow::{anyhow, bail, Result};
|
||||
use anyhow::{Result, anyhow, bail};
|
||||
use mail_parser::{Address as ParserAddress, HeaderValue, MessageParser};
|
||||
use pimalaya_cli::printer::{Message, Printer};
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
use std::{
|
||||
fmt,
|
||||
io::{stdout, Write},
|
||||
io::{Write, stdout},
|
||||
};
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Parser;
|
||||
use mail_parser::{Message, MessageParser};
|
||||
use pimalaya_cli::printer::Printer;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use std::io::{stdout, Write};
|
||||
use std::io::{Write, stdout};
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Parser;
|
||||
use pimalaya_cli::printer::Printer;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ use std::{
|
||||
process::{Command, Stdio},
|
||||
};
|
||||
|
||||
use anyhow::{anyhow, bail, Result};
|
||||
use anyhow::{Result, anyhow, bail};
|
||||
|
||||
use crate::config::{ComposerConfig, ReaderConfig};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{
|
||||
io::{stdin, BufRead, IsTerminal},
|
||||
io::{BufRead, IsTerminal, stdin},
|
||||
path::PathBuf,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user