diff options
author | BlackDex <[email protected]> | 2021-11-16 17:07:55 +0100 |
---|---|---|
committer | Daniel GarcĂa <[email protected]> | 2022-01-30 22:26:18 +0100 |
commit | 775d07e9a0d6e33f5af63abb571cae4e434795d9 (patch) | |
tree | 3c21325924dbe68a25294300e8b43c5902ff96de /src/main.rs | |
parent | 2d5f172e777e09a47c79d8437d94df160afd6e38 (diff) | |
download | vaultwarden-775d07e9a0d6e33f5af63abb571cae4e434795d9.tar.gz vaultwarden-775d07e9a0d6e33f5af63abb571cae4e434795d9.zip |
Async/Awaited all db methods
This is a rather large PR which updates the async branch to have all the
database methods as an async fn.
Some iter/map logic needed to be changed to a stream::iter().then(), but
besides that most changes were just adding async/await where needed.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index bcbf1d29..17305a5e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,6 @@ #![forbid(unsafe_code)] +// #![warn(rust_2018_idioms)] +#![warn(rust_2021_compatibility)] #![cfg_attr(feature = "unstable", feature(ip))] // The recursion_limit is mainly triggered by the json!() macro. // The more key/value pairs there are the more recursion occurs. @@ -72,7 +74,7 @@ async fn main() -> Result<(), Error> { let pool = create_db_pool(); schedule_jobs(pool.clone()).await; - crate::db::models::TwoFactor::migrate_u2f_to_webauthn(&pool.get().await.unwrap()).unwrap(); + crate::db::models::TwoFactor::migrate_u2f_to_webauthn(&pool.get().await.unwrap()).await.unwrap(); launch_rocket(pool, extra_debug).await // Blocks until program termination. } |