From 461a4856edd61b7a5f8be782f728c5e77f65bd41 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Fri, 28 Oct 2022 00:17:01 -0400 Subject: [PATCH] Fix import grouping I would set this in rustfmt.toml, but it's not a stable option :( --- src/email.rs | 3 +-- src/email/inbox/idle.rs | 3 +-- src/email/login.rs | 3 +-- src/main.rs | 3 +-- src/task.rs | 9 ++++++--- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/email.rs b/src/email.rs index b0be3e6..93e5f1b 100644 --- a/src/email.rs +++ b/src/email.rs @@ -332,10 +332,9 @@ mod tests { use crate::testutil::TokioSpawner; use super::*; - use futures::stream; use futures::{ channel::oneshot::{self, Sender}, - StreamExt, + stream, StreamExt, }; use thiserror::Error; use tokio::time; diff --git a/src/email/inbox/idle.rs b/src/email/inbox/idle.rs index a8138df..33ad1b9 100644 --- a/src/email/inbox/idle.rs +++ b/src/email/inbox/idle.rs @@ -7,8 +7,7 @@ use thiserror::Error; use crate::{IMAPSession, IMAPTransportStream}; use async_imap::{ - error::Error as IMAPError, - error::Result as IMAPResult, + error::{Error as IMAPError, Result as IMAPResult}, extensions::idle::{Handle, IdleResponse}, imap_proto::Response as IMAPResponse, }; diff --git a/src/email/login.rs b/src/email/login.rs index e145fda..116738a 100644 --- a/src/email/login.rs +++ b/src/email/login.rs @@ -1,7 +1,6 @@ //! The login module abstracts the generation of IMAP sessions for use when fetching emails -use crate::config::IMAP as IMAPConfig; -use crate::{IMAPClient, IMAPSession}; +use crate::{config::IMAP as IMAPConfig, IMAPClient, IMAPSession}; use async_imap::error::Result as IMAPResult; use async_native_tls::TlsConnector; use async_trait::async_trait; diff --git a/src/main.rs b/src/main.rs index f5f1822..9f2cf91 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,8 +5,7 @@ extern crate log; use async_trait::async_trait; use clap::Parser; -use futures::{select, FutureExt}; -use futures::{stream::StreamExt, Future}; +use futures::{select, stream::StreamExt, Future, FutureExt}; use log::LevelFilter; use tokio::task::{JoinError, JoinHandle}; use ynabifier::task::{Handle, Join}; diff --git a/src/task.rs b/src/task.rs index d57e34c..b726eab 100644 --- a/src/task.rs +++ b/src/task.rs @@ -1,7 +1,10 @@ use async_trait::async_trait; -use std::error::Error; -use std::fmt::{Display, Formatter}; -pub(crate) use {register::Registry, stop::Resolution as StopResolution, stop::ResolveOrStop}; +pub(crate) use register::Registry; +use std::{ + error::Error, + fmt::{Display, Formatter}, +}; +pub(crate) use stop::{Resolution as StopResolution, ResolveOrStop}; use futures::Future; use thiserror::Error;