summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2020-09-18 13:49:09 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2020-09-18 21:06:33 +0300
commit05e4dbcd5aba410837aae0b39e4941ec5b0049e9 (patch)
tree7487d489e9b57aa51538d72258c86ef777ad8e56 /tools
parent40b63cc3e017ba616bd61ed50fba9a8249b5044a (diff)
melib: update smol to 1.0.0
Diffstat (limited to 'tools')
-rw-r--r--tools/src/imapshell.rs5
-rw-r--r--tools/src/mboxparse.rs1
-rw-r--r--tools/src/smtp_conn.rs7
3 files changed, 8 insertions, 5 deletions
diff --git a/tools/src/imapshell.rs b/tools/src/imapshell.rs
index 4a10a9db..e6df86b2 100644
--- a/tools/src/imapshell.rs
+++ b/tools/src/imapshell.rs
@@ -48,7 +48,10 @@ fn main() -> Result<()> {
BackendEventConsumer::new(std::sync::Arc::new(|_, _| ())),
)?;
- std::thread::spawn(|| smol::run(futures::future::pending::<()>()));
+ std::thread::spawn(move || {
+ let ex = smol::Executor::new();
+ futures::executor::block_on(ex.run(futures::future::pending::<()>()));
+ });
(imap.as_any_mut())
.downcast_mut::<ImapType>()
.unwrap()
diff --git a/tools/src/mboxparse.rs b/tools/src/mboxparse.rs
index 1abb8c56..0c861936 100644
--- a/tools/src/mboxparse.rs
+++ b/tools/src/mboxparse.rs
@@ -21,7 +21,6 @@
extern crate melib;
use melib::Result;
-use melib::*;
/// Parses e-mail from files and prints the debug information of the parsed `Envelope`
///
diff --git a/tools/src/smtp_conn.rs b/tools/src/smtp_conn.rs
index a8665f82..0d87dd0d 100644
--- a/tools/src/smtp_conn.rs
+++ b/tools/src/smtp_conn.rs
@@ -20,9 +20,10 @@ fn main() -> Result<()> {
},
envelope_from: String::new(),
};
- for _ in 0..1 {
- std::thread::spawn(|| smol::run(futures::future::pending::<()>()));
- }
+ std::thread::spawn(move || {
+ let ex = smol::Executor::new();
+ futures::executor::block_on(ex.run(futures::future::pending::<()>()));
+ });
let mut conn = futures::executor::block_on(SmtpConnection::new_connection(conf)).unwrap();
futures::executor::block_on(conn.mail_transaction(