about to completely reformat again

This commit is contained in:
Ryan Voots 2020-08-17 18:52:57 -07:00
parent c172eda415
commit 14a9cd4256
2 changed files with 27 additions and 2 deletions

22
rustfmt.toml Normal file
View file

@ -0,0 +1,22 @@
unstable_features = true
blank_lines_lower_bound = 1
blank_lines_upper_bound = 3
chain_width = 120
wrap_comments = true
comment_width = 100
edition = 2018
enum_discrim_align_threshold = 16
fn_params_layout = "Compressed"
fn_call_width = 100
fn_single_line = true
format_code_in_doc_comments = true
ignore = ["extern/"]
max_width = 120
merge_derives = true
merge_imports = true
normalize_doc_attributes = true
reorder_impl_items = true
tab_spaces = 2
use_field_init_shorthand = true
use_try_shorthand = true
where_single_line = true

View file

@ -214,8 +214,12 @@ pub async fn login_and_sync(
// since we called sync before we `sync_forever` we must pass that sync token to // since we called sync before we `sync_forever` we must pass that sync token to
// `sync_forever` // `sync_forever`
let mut settings = SyncSettings::default().token(client.sync_token().await.unwrap()); let settings = SyncSettings::default().token(client.sync_token().await.unwrap());
Ok(())
}
async fn client_task(client: Client, settings: SyncSettings) -> Result<(), anyhow::Error> {
let client_ref = &client; let client_ref = &client;
client client
.sync_forever(settings, async move |response| { .sync_forever(settings, async move |response| {
@ -304,6 +308,5 @@ pub async fn login_and_sync(
} }
}) })
.await; .await;
Ok(()) Ok(())
} }