example: happy clippy

This commit is contained in:
dignifiedquire
2020-05-22 11:48:40 +02:00
parent 28ef5164ce
commit da7db04c0e
2 changed files with 8 additions and 16 deletions

View File

@@ -6,10 +6,6 @@
#[macro_use]
extern crate deltachat;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate rusqlite;
use std::borrow::Cow::{self, Borrowed, Owned};
use std::io::{self, Write};
@@ -282,12 +278,8 @@ async fn start(args: Vec<String>) -> Result<(), Error> {
let ctx = context.clone();
async_std::task::spawn(async move {
loop {
if ctx.has_next_event() {
if let Ok(event) = ctx.get_next_event() {
receive_event(event);
}
} else {
async_std::task::sleep(std::time::Duration::from_millis(50)).await;
if let Ok(event) = ctx.get_next_event() {
receive_event(event);
}
}
});