From a4ca22f08319b97cfc6c1a4ab140b98b31d6e6fe Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 23 Jun 2021 14:05:58 -0400 Subject: [PATCH] Upgrading deps, running clippy fix on nightly 1.55.0 --- Cargo.lock | 1210 +++++++++-------- Cargo.toml | 26 +- crates/api/Cargo.toml | 42 +- crates/api/src/comment.rs | 10 +- crates/api/src/comment_report.rs | 10 +- crates/api/src/community.rs | 8 +- crates/api/src/lib.rs | 4 +- crates/api/src/local_user.rs | 26 +- crates/api/src/post.rs | 8 +- crates/api/src/post_report.rs | 10 +- crates/api/src/private_message.rs | 2 +- crates/api/src/site.rs | 12 +- crates/api/src/websocket.rs | 8 +- crates/api_common/Cargo.toml | 8 +- crates/api_common/src/lib.rs | 16 +- crates/api_crud/Cargo.toml | 42 +- crates/api_crud/src/comment/create.rs | 12 +- crates/api_crud/src/comment/delete.rs | 8 +- crates/api_crud/src/comment/read.rs | 2 +- crates/api_crud/src/comment/update.rs | 4 +- crates/api_crud/src/community/create.rs | 2 +- crates/api_crud/src/community/delete.rs | 4 +- crates/api_crud/src/community/read.rs | 4 +- crates/api_crud/src/community/update.rs | 2 +- crates/api_crud/src/lib.rs | 2 +- crates/api_crud/src/post/create.rs | 2 +- crates/api_crud/src/post/delete.rs | 4 +- crates/api_crud/src/post/read.rs | 4 +- crates/api_crud/src/post/update.rs | 2 +- crates/api_crud/src/private_message/create.rs | 4 +- crates/api_crud/src/private_message/delete.rs | 2 +- crates/api_crud/src/private_message/read.rs | 4 +- crates/api_crud/src/private_message/update.rs | 2 +- crates/api_crud/src/site/create.rs | 2 +- crates/api_crud/src/site/read.rs | 2 +- crates/api_crud/src/site/update.rs | 2 +- crates/api_crud/src/user/create.rs | 4 +- crates/api_crud/src/user/delete.rs | 2 +- crates/api_crud/src/user/read.rs | 2 +- crates/apub/Cargo.toml | 46 +- crates/apub/src/activities/send/comment.rs | 26 +- crates/apub/src/activities/send/community.rs | 6 +- crates/apub/src/activities/send/person.rs | 2 +- crates/apub/src/activities/send/post.rs | 6 +- crates/apub/src/extensions/signatures.rs | 2 +- crates/apub/src/fetcher/community.rs | 16 +- crates/apub/src/fetcher/fetch.rs | 2 +- crates/apub/src/fetcher/search.rs | 4 +- crates/apub/src/objects/comment.rs | 4 +- crates/apub/src/objects/community.rs | 2 +- crates/apub/src/objects/mod.rs | 2 +- crates/apub/src/objects/post.rs | 2 +- crates/apub_receive/Cargo.toml | 42 +- .../src/activities/receive/mod.rs | 2 +- .../src/activities/receive/private_message.rs | 14 +- crates/apub_receive/src/http/community.rs | 12 +- crates/apub_receive/src/http/mod.rs | 2 +- crates/apub_receive/src/http/person.rs | 4 +- .../apub_receive/src/inbox/community_inbox.rs | 26 +- crates/apub_receive/src/inbox/mod.rs | 12 +- crates/apub_receive/src/inbox/person_inbox.rs | 24 +- .../src/inbox/receive_for_community.rs | 50 +- crates/apub_receive/src/inbox/shared_inbox.rs | 4 +- crates/db_queries/Cargo.toml | 20 +- crates/db_queries/src/lib.rs | 2 +- crates/db_queries/src/source/activity.rs | 2 +- crates/db_queries/src/source/local_user.rs | 2 +- .../src/source/password_reset_request.rs | 2 +- crates/db_schema/Cargo.toml | 10 +- crates/db_views/Cargo.toml | 8 +- crates/db_views_actor/Cargo.toml | 4 +- crates/db_views_moderator/Cargo.toml | 4 +- crates/routes/Cargo.toml | 14 +- crates/routes/src/feeds.rs | 30 +- crates/routes/src/images.rs | 2 +- crates/utils/Cargo.toml | 40 +- crates/utils/src/claims.rs | 2 +- crates/utils/src/email.rs | 12 +- crates/utils/src/request.rs | 2 +- crates/utils/src/test.rs | 2 +- crates/utils/src/utils.rs | 2 +- crates/websocket/Cargo.toml | 20 +- crates/websocket/src/chat_server.rs | 5 +- src/code_migrations.rs | 24 +- src/scheduled_tasks.rs | 4 +- 85 files changed, 1068 insertions(+), 977 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b5c654131..ea1c9776f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,8 +33,8 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1be241f88f3b1e7e9a3fbe3b5a8a0f6915b5a1d7ee0d9a248d3376d01068cc60" dependencies = [ - "actix-rt", - "actix_derive", + "actix-rt 1.1.1", + "actix_derive 0.5.0", "bitflags", "bytes 0.5.6", "crossbeam-channel 0.4.4", @@ -44,14 +44,38 @@ dependencies = [ "log", "once_cell", "parking_lot", - "pin-project 0.4.27", + "pin-project 0.4.28", "smallvec", "tokio 0.2.25", - "tokio-util", + "tokio-util 0.3.1", "trust-dns-proto", "trust-dns-resolver", ] +[[package]] +name = "actix" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3720d0064a0ce5c0de7bd93bdb0a6caebab2a9b5668746145d7b3b0c5da02914" +dependencies = [ + "actix-rt 2.2.0", + "actix_derive 0.6.0", + "bitflags", + "bytes 1.0.1", + "crossbeam-channel 0.5.1", + "futures-core", + "futures-sink", + "futures-task", + "futures-util", + "log", + "once_cell", + "parking_lot", + "pin-project-lite 0.2.6", + "smallvec", + "tokio 1.7.1", + "tokio-util 0.6.7", +] + [[package]] name = "actix-codec" version = "0.3.0" @@ -63,9 +87,9 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project 0.4.27", + "pin-project 0.4.28", "tokio 0.2.25", - "tokio-util", + "tokio-util 0.3.1", ] [[package]] @@ -75,7 +99,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" dependencies = [ "actix-codec", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "actix-utils", "derive_more", @@ -98,7 +122,7 @@ checksum = "452299e87817ae5673910e53c243484ca38be3828db819b6011736fc6982e874" dependencies = [ "actix-codec", "actix-connect", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "actix-threadpool", "actix-tls", @@ -117,7 +141,7 @@ dependencies = [ "futures-core", "futures-util", "fxhash", - "h2", + "h2 0.2.7", "http", "httparse", "indexmap", @@ -127,15 +151,15 @@ dependencies = [ "log", "mime", "percent-encoding", - "pin-project 1.0.4", + "pin-project 1.0.7", "rand 0.7.3", "regex", "serde", "serde_json", "serde_urlencoded", - "sha-1 0.9.3", + "sha-1 0.9.6", "slab", - "time 0.2.25", + "time 0.2.27", ] [[package]] @@ -144,15 +168,25 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ca8ce00b267af8ccebbd647de0d61e0674b6e61185cc7a592ff88772bed655" dependencies = [ - "quote 1.0.8", - "syn 1.0.60", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "actix-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f86cd6857c135e6e9fe57b1619a88d1f94a7df34c00e11fe13e64fd3438837" +dependencies = [ + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "actix-router" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8be584b3b6c705a18eabc11c4059cf83b255bdd8511673d1d569f4ce40c69de" +checksum = "2ad299af73649e1fc893e333ccf86f377751eb95ff875d095131574c6f43452c" dependencies = [ "bytestring", "http", @@ -167,7 +201,7 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227" dependencies = [ - "actix-macros", + "actix-macros 0.1.3", "actix-threadpool", "copyless", "futures-channel", @@ -176,6 +210,17 @@ dependencies = [ "tokio 0.2.25", ] +[[package]] +name = "actix-rt" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d7cd957c9ed92288a7c3c96af81fa5291f65247a76a34dac7b6af74e52ba0" +dependencies = [ + "actix-macros 0.2.1", + "futures-core", + "tokio 1.7.1", +] + [[package]] name = "actix-server" version = "1.0.4" @@ -183,17 +228,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" dependencies = [ "actix-codec", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "actix-utils", "futures-channel", "futures-util", "log", - "mio", + "mio 0.6.23", "mio-uds", "num_cpus", "slab", - "socket2", + "socket2 0.3.19", ] [[package]] @@ -203,7 +248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" dependencies = [ "futures-util", - "pin-project 0.4.27", + "pin-project 0.4.28", ] [[package]] @@ -212,12 +257,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" dependencies = [ - "actix-macros", - "actix-rt", + "actix-macros 0.1.3", + "actix-rt 1.1.1", "actix-server", "actix-service", "log", - "socket2", + "socket2 0.3.19", ] [[package]] @@ -258,7 +303,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" dependencies = [ "actix-codec", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "bitflags", "bytes 0.5.6", @@ -267,7 +312,7 @@ dependencies = [ "futures-sink", "futures-util", "log", - "pin-project 0.4.27", + "pin-project 0.4.28", "slab", ] @@ -279,9 +324,9 @@ checksum = "e641d4a172e7faa0862241a20ff4f1f5ab0ab7c279f00c2d4587b77483477b86" dependencies = [ "actix-codec", "actix-http", - "actix-macros", + "actix-macros 0.1.3", "actix-router", - "actix-rt", + "actix-rt 1.1.1", "actix-server", "actix-service", "actix-testing", @@ -299,14 +344,14 @@ dependencies = [ "fxhash", "log", "mime", - "pin-project 1.0.4", + "pin-project 1.0.7", "regex", "rustls", "serde", "serde_json", "serde_urlencoded", - "socket2", - "time 0.2.25", + "socket2 0.3.19", + "time 0.2.27", "tinyvec", "url", ] @@ -317,14 +362,14 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6edf3c2693e2a8c422800c87ee89a6a4eac7dd01109bc172a1093ce1f4f001" dependencies = [ - "actix", + "actix 0.10.0", "actix-codec", "actix-http", "actix-web", "bytes 0.5.6", "futures-channel", "futures-core", - "pin-project 0.4.27", + "pin-project 0.4.28", ] [[package]] @@ -333,9 +378,9 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad26f77093333e0e7c6ffe54ebe3582d908a104e448723eec6d43d08b07143fb" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -344,25 +389,36 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b95aceadaf327f18f0df5962fedc1bde2f870566a0b9f65c89508a3b1f79334c" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "actix_derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d44b8fee1ced9671ba043476deddef739dd0959bf77030b26b738cc591737a7" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "addr2line" -version = "0.14.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" +checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" dependencies = [ "gimli", ] [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "adler32" @@ -378,18 +434,18 @@ checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.38" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" +checksum = "15af2628f6890fe2609a3b91bef4c83450512802e59489f9c1cb1fa5df064a61" [[package]] name = "async-mutex" @@ -402,13 +458,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.42" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" +checksum = "0b98e84bbb4cbcdd97da190ba0c58a1bb0de2c1fdf67d159e192ed766aeca722" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -448,7 +504,7 @@ checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" dependencies = [ "actix-codec", "actix-http", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "base64 0.13.0", "bytes 0.5.6", @@ -467,9 +523,9 @@ dependencies = [ [[package]] name = "background-jobs" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c445edc4c6f8329385507bddd65491bfa3293f0a46a785119a14e526710ab320" +checksum = "1ce8953ce13a4bc359900fca168b64e47d5f0af1c02f2d45527221babbb73a27" dependencies = [ "background-jobs-actix", "background-jobs-core", @@ -477,11 +533,11 @@ dependencies = [ [[package]] name = "background-jobs-actix" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0caa1f592d2bcfde1e3b38db933215320e2402e75dc60afbfedbf59b831a74" +checksum = "9e170bb20c0ca37c8bdd212753a0c51dbe570fcb13dba2d2c819241bc376fb70" dependencies = [ - "actix-rt", + "actix-rt 2.2.0", "anyhow", "async-mutex", "async-trait", @@ -489,21 +545,20 @@ dependencies = [ "chrono", "log", "num_cpus", - "rand 0.7.3", "serde", "serde_json", "thiserror", - "tokio 0.2.25", + "tokio 1.7.1", "uuid", ] [[package]] name = "background-jobs-core" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68ae77ec4330e8ac4ea643ce2f25d1e8d81509eb659e671b18f68d91939d72d" +checksum = "d7fc10cc1d7bc1cf5695efa5f56e0f9d6906f7863bc14acb03ff8a6fff8b6e95" dependencies = [ - "actix-rt", + "actix-rt 2.2.0", "anyhow", "async-mutex", "async-trait", @@ -512,20 +567,21 @@ dependencies = [ "serde", "serde_json", "thiserror", - "tokio 0.2.25", + "tokio 1.7.1", "uuid", ] [[package]] name = "backtrace" -version = "0.3.56" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" +checksum = "b7815ea54e4d821e791162e078acbebfd6d8c8939cd559c9335dceb1c8ca7282" dependencies = [ "addr2line", + "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.4.3", + "miniz_oxide 0.4.4", "object", "rustc-demangle", ] @@ -550,13 +606,13 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bcrypt" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d0faafe9e089674fc3efdb311ff5253d445c79d85d1d28bd3ace76d45e7164" +checksum = "1ff61734d6bd86e9739fe61bce08b753ae61ae76101dc2df8399eda2503d5a29" dependencies = [ "base64 0.13.0", "blowfish", - "getrandom 0.2.2", + "getrandom 0.2.3", ] [[package]] @@ -567,9 +623,9 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bitvec" -version = "0.19.4" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ba35e9565969edb811639dbebfe34edc0368e472c5018474c8eb2543397f81" +checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" dependencies = [ "funty", "radium", @@ -586,7 +642,7 @@ dependencies = [ "block-padding", "byte-tools", "byteorder", - "generic-array 0.12.3", + "generic-array 0.12.4", ] [[package]] @@ -609,9 +665,9 @@ dependencies = [ [[package]] name = "blowfish" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fa6a061124e37baba002e496d203e23ba3d7b73750be82dbfbc92913048a5b" +checksum = "fe3ff3fc1de48c1ac2e3341c4df38b0d1bfb8fdf04632a187c8b75aaa319a7ab" dependencies = [ "byteorder", "cipher", @@ -640,9 +696,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9" +checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" [[package]] name = "byte-tools" @@ -652,15 +708,15 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a4bad0c5981acc24bc09e532f35160f952e35422603f0563cd7a73c2c2e65a0" +checksum = "9966d2ab714d0f785dbac0a0396251a35280aeb42413281617d0209ab4898435" [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" @@ -705,9 +761,9 @@ checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad" [[package]] name = "cc" -version = "1.0.66" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" +checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787" [[package]] name = "cfg-if" @@ -737,18 +793,18 @@ dependencies = [ [[package]] name = "cipher" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ "generic-array 0.14.4", ] [[package]] name = "clokwerk" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9797a6d3acefa28d4cc62bf548b6ddc57b8ae51a43702d001cb46fba1dc48c1" +checksum = "7a99373edf782eec8fde0d52bd2f60e4ae5eaca31f1d2cf5aec68243849a37a9" dependencies = [ "chrono", ] @@ -761,9 +817,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "comrak" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcfb8008d04126b176c76cbfdecf9a2ccb4bacc70af87c8da6136d63d7b7292a" +checksum = "b423acba50d5016684beaf643f9991e622633a4c858be6885653071c2da2b0c6" dependencies = [ "entities", "lazy_static", @@ -779,18 +835,24 @@ dependencies = [ [[package]] name = "const_fn" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6" +checksum = "f92cfa0fd5690b3cf8c1ef2cabbd9b7ef22fa53cf5e1f92b05103f6d5d1cf6e7" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cookie" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784ad0fbab4f3e9cef09f20e0aea6000ae08d2cb98ac4c0abc53df18803d702f" +checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" dependencies = [ "percent-encoding", - "time 0.2.25", + "time 0.2.27", "version_check", ] @@ -817,10 +879,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" [[package]] -name = "cpuid-bool" -version = "0.1.2" +name = "cpufeatures" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" +dependencies = [ + "libc", +] [[package]] name = "crc32fast" @@ -843,12 +908,12 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.1", + "crossbeam-utils 0.8.5", ] [[package]] @@ -859,18 +924,17 @@ checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.1", + "crossbeam-utils 0.8.5", ] [[package]] name = "crossbeam-epoch" -version = "0.9.1" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" +checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" dependencies = [ "cfg-if 1.0.0", - "const_fn", - "crossbeam-utils 0.8.1", + "crossbeam-utils 0.8.5", "lazy_static", "memoffset", "scopeguard", @@ -889,11 +953,10 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" +checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" dependencies = [ - "autocfg", "cfg-if 1.0.0", "lazy_static", ] @@ -916,10 +979,10 @@ checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.24", - "quote 1.0.8", + "proc-macro2 1.0.27", + "quote 1.0.9", "strsim", - "syn 1.0.60", + "syn 1.0.73", ] [[package]] @@ -929,8 +992,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ "darling_core", - "quote 1.0.8", - "syn 1.0.60", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -951,9 +1014,9 @@ checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" dependencies = [ "darling", "derive_builder_core", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -963,36 +1026,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" dependencies = [ "darling", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "derive_more" -version = "0.99.11" +version = "0.99.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" +checksum = "5cc7b9cef1e351660e5443924e4f43ab25fbbed3e9a5f052df3677deb4d6b320" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "convert_case", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "deser-hjson" -version = "0.1.12" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d995b60ff81bc6af01a98f0bf5db70a7418a1ac8bd74ada633968f388139da5e" +checksum = "bf2973e4fb5f11bb10cc56814ce30e9721ced195cec313a80c94ce29c2f0e896" dependencies = [ "serde", ] [[package]] name = "diesel" -version = "1.4.5" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2de9deab977a153492a1468d1b1c0662c1cf39e5ea87d0c060ecd59ef18d8c" +checksum = "bba51ca66f57261fd17cadf8b73e4775cc307d0521d855de3f5de91a8f074e0e" dependencies = [ "bitflags", "byteorder", @@ -1021,9 +1085,9 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -1042,7 +1106,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array 0.12.3", + "generic-array 0.12.4", ] [[package]] @@ -1077,9 +1141,9 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" -version = "0.8.26" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" +checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" dependencies = [ "cfg-if 1.0.0", ] @@ -1097,16 +1161,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ "heck", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "env_logger" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" dependencies = [ "atty", "humantime", @@ -1138,13 +1202,22 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fallible_collections" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74bebf0efe2e883c1619c455e3f1764333064694ebd5125d2faddabfb5963186" +checksum = "4ad9169582543d2cfe9961be1e9eaf4fc42f9aa3483f7c485717b8dde36466ea" dependencies = [ "hashbrown", ] +[[package]] +name = "fastrand" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b705829d1e87f762c2df6da140b26af5839e1033aa84aa5f56bb688e4e1bdb" +dependencies = [ + "instant", +] + [[package]] name = "flate2" version = "1.0.20" @@ -1154,7 +1227,7 @@ dependencies = [ "cfg-if 1.0.0", "crc32fast", "libc", - "miniz_oxide 0.4.3", + "miniz_oxide 0.4.4", ] [[package]] @@ -1180,9 +1253,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ "matches", "percent-encoding", @@ -1212,9 +1285,9 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" [[package]] name = "futures" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" +checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" dependencies = [ "futures-channel", "futures-core", @@ -1227,9 +1300,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" +checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" dependencies = [ "futures-core", "futures-sink", @@ -1237,15 +1310,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" +checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" [[package]] name = "futures-executor" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9" +checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79" dependencies = [ "futures-core", "futures-task", @@ -1254,43 +1327,42 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" +checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" [[package]] name = "futures-macro" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" +checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" dependencies = [ + "autocfg", "proc-macro-hack", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "futures-sink" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" +checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" [[package]] name = "futures-task" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" -dependencies = [ - "once_cell", -] +checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" [[package]] name = "futures-util" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" +checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" dependencies = [ + "autocfg", "futures-channel", "futures-core", "futures-io", @@ -1298,7 +1370,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.4", + "pin-project-lite 0.2.6", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -1316,9 +1388,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ "typenum", ] @@ -1346,9 +1418,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ "cfg-if 1.0.0", "libc", @@ -1357,9 +1429,9 @@ dependencies = [ [[package]] name = "gif" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02efba560f227847cb41463a7395c514d127d4f74fff12ef0137fff1b84b96c4" +checksum = "5a668f699973d0f573d15749b7002a9ac9e1f9c6b220e7b165601334c173d8de" dependencies = [ "color_quant", "weezl", @@ -1367,9 +1439,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" +checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "h2" @@ -1386,11 +1458,30 @@ dependencies = [ "indexmap", "slab", "tokio 0.2.25", - "tokio-util", + "tokio-util 0.3.1", "tracing", "tracing-futures", ] +[[package]] +name = "h2" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726" +dependencies = [ + "bytes 1.0.1", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio 1.7.1", + "tokio-util 0.6.7", + "tracing", +] + [[package]] name = "hashbrown" version = "0.9.1" @@ -1402,9 +1493,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ "unicode-segmentation", ] @@ -1437,9 +1528,9 @@ checksum = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549" [[package]] name = "http" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" +checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" dependencies = [ "bytes 1.0.1", "fnv", @@ -1448,12 +1539,13 @@ dependencies = [ [[package]] name = "http-body" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "http", + "pin-project-lite 0.2.6", ] [[package]] @@ -1486,12 +1578,12 @@ dependencies = [ [[package]] name = "http-signature-normalization-reqwest" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc26a68f8963e26453c7fdea9e016e2e31a48ca018a9223f96afe2cca1a4bd1" +checksum = "4a1e24f3c8b2c8b5eddb82d4cdf07dafe01f5b87f92b81a369dd520a107d33e8" dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", + "base64 0.13.0", + "bytes 1.0.1", "chrono", "futures", "http", @@ -1499,20 +1591,20 @@ dependencies = [ "reqwest", "sha2", "thiserror", - "tokio 0.2.25", + "tokio 1.7.1", ] [[package]] name = "httparse" -version = "1.3.5" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" +checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68" [[package]] name = "httpdate" -version = "0.3.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" [[package]] name = "humantime" @@ -1522,23 +1614,23 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.13.9" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf" +checksum = "07d6baa1b441335f3ce5098ac421fb6547c46dda735ca1bc6d0153c838f9dd83" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.3", "http", "http-body", "httparse", "httpdate", "itoa", - "pin-project 1.0.4", - "socket2", - "tokio 0.2.25", + "pin-project-lite 0.2.6", + "socket2 0.4.0", + "tokio 1.7.1", "tower-service", "tracing", "want", @@ -1546,32 +1638,15 @@ dependencies = [ [[package]] name = "hyper-tls" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "hyper", "native-tls", - "tokio 0.2.25", - "tokio-tls", -] - -[[package]] -name = "hyperx" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82566a1ace7f56f604d83b7b2c259c78e243d99c565f23d7b4ae34466442c5a2" -dependencies = [ - "base64 0.13.0", - "bytes 1.0.1", - "http", - "httparse", - "httpdate", - "language-tags", - "mime", - "percent-encoding", - "unicase", + "tokio 1.7.1", + "tokio-native-tls", ] [[package]] @@ -1582,9 +1657,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" dependencies = [ "matches", "unicode-bidi", @@ -1593,9 +1668,9 @@ dependencies = [ [[package]] name = "image" -version = "0.23.12" +version = "0.23.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce04077ead78e39ae8610ad26216aed811996b043d47beed5090db674f9e9b5" +checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" dependencies = [ "bytemuck", "byteorder", @@ -1612,9 +1687,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" +checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" dependencies = [ "autocfg", "hashbrown", @@ -1644,7 +1719,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" dependencies = [ - "socket2", + "socket2 0.3.19", "widestring", "winapi 0.3.9", "winreg 0.6.2", @@ -1652,15 +1727,15 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" +checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" [[package]] name = "itertools" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319" +checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" dependencies = [ "either", ] @@ -1682,9 +1757,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.47" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" +checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" dependencies = [ "wasm-bindgen", ] @@ -1729,8 +1804,8 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" name = "lemmy_api" version = "0.1.0" dependencies = [ - "actix", - "actix-rt", + "actix 0.12.0", + "actix-rt 2.2.0", "actix-web", "anyhow", "async-trait", @@ -1757,7 +1832,7 @@ dependencies = [ "lemmy_websocket", "log", "openssl", - "rand 0.8.3", + "rand 0.8.4", "reqwest", "serde", "serde_json", @@ -1765,7 +1840,7 @@ dependencies = [ "strum", "strum_macros", "thiserror", - "tokio 0.3.7", + "tokio 1.7.1", "url", "uuid", ] @@ -1793,8 +1868,8 @@ dependencies = [ name = "lemmy_api_crud" version = "0.1.0" dependencies = [ - "actix", - "actix-rt", + "actix 0.12.0", + "actix-rt 2.2.0", "actix-web", "anyhow", "async-trait", @@ -1820,7 +1895,7 @@ dependencies = [ "lemmy_websocket", "log", "openssl", - "rand 0.8.3", + "rand 0.8.4", "reqwest", "serde", "serde_json", @@ -1828,7 +1903,7 @@ dependencies = [ "strum", "strum_macros", "thiserror", - "tokio 0.3.7", + "tokio 1.7.1", "url", "uuid", ] @@ -1839,8 +1914,8 @@ version = "0.1.0" dependencies = [ "activitystreams", "activitystreams-ext", - "actix", - "actix-rt", + "actix 0.12.0", + "actix-rt 2.2.0", "actix-web", "anyhow", "async-trait", @@ -1867,7 +1942,7 @@ dependencies = [ "log", "openssl", "percent-encoding", - "rand 0.8.3", + "rand 0.8.4", "reqwest", "serde", "serde_json", @@ -1875,7 +1950,7 @@ dependencies = [ "strum", "strum_macros", "thiserror", - "tokio 0.3.7", + "tokio 1.7.1", "url", "uuid", ] @@ -1886,8 +1961,8 @@ version = "0.1.0" dependencies = [ "activitystreams", "activitystreams-ext", - "actix", - "actix-rt", + "actix 0.12.0", + "actix-rt 2.2.0", "actix-web", "anyhow", "async-trait", @@ -1913,14 +1988,14 @@ dependencies = [ "log", "openssl", "percent-encoding", - "rand 0.8.3", + "rand 0.8.4", "serde", "serde_json", "sha2", "strum", "strum_macros", "thiserror", - "tokio 0.3.7", + "tokio 1.7.1", "url", ] @@ -1996,7 +2071,7 @@ dependencies = [ name = "lemmy_routes" version = "0.1.0" dependencies = [ - "actix", + "actix 0.12.0", "actix-web", "actix-web-actors", "anyhow", @@ -2024,8 +2099,8 @@ name = "lemmy_server" version = "0.0.1" dependencies = [ "activitystreams", - "actix", - "actix-rt", + "actix 0.10.0", + "actix-rt 2.2.0", "actix-web", "anyhow", "cargo-husky", @@ -2054,7 +2129,7 @@ dependencies = [ "serde", "serde_json", "strum", - "tokio 0.3.7", + "tokio 1.7.1", "url", ] @@ -2062,7 +2137,7 @@ dependencies = [ name = "lemmy_utils" version = "0.1.0" dependencies = [ - "actix-rt", + "actix-rt 2.2.0", "actix-web", "anyhow", "chrono", @@ -2080,7 +2155,7 @@ dependencies = [ "merge", "openssl", "percent-encoding", - "rand 0.8.3", + "rand 0.8.4", "regex", "reqwest", "serde", @@ -2088,7 +2163,7 @@ dependencies = [ "strum", "strum_macros", "thiserror", - "tokio 0.3.7", + "tokio 1.7.1", "url", ] @@ -2096,7 +2171,7 @@ dependencies = [ name = "lemmy_websocket" version = "0.1.0" dependencies = [ - "actix", + "actix 0.10.0", "actix-web", "actix-web-actors", "anyhow", @@ -2108,24 +2183,25 @@ dependencies = [ "lemmy_db_schema", "lemmy_utils", "log", - "rand 0.8.3", + "rand 0.8.4", "reqwest", "serde", "serde_json", "strum", "strum_macros", - "tokio 0.3.7", + "tokio 1.7.1", ] [[package]] name = "lettre" -version = "0.10.0-alpha.5" +version = "0.10.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f3dd8d917156976a47ef421a2e771423d6da95e93696f1814e76768625c162" +checksum = "d8697ded52353bdd6fec234b3135972433397e86d0493d9fc38fbf407b7c106a" dependencies = [ "base64 0.13.0", + "fastrand", "hostname", - "hyperx", + "httpdate", "idna", "mime", "native-tls", @@ -2133,18 +2209,14 @@ dependencies = [ "once_cell", "quoted_printable", "r2d2", - "rand 0.8.3", "regex", - "serde", - "serde_json", - "uuid", ] [[package]] name = "libc" -version = "0.2.84" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cca32fa0182e8c0989459524dc356b8f2b5c10f1b9eb521b7d182c03cf8c5ff" +checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" [[package]] name = "linked-hash-map" @@ -2154,18 +2226,18 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "lock_api" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" dependencies = [ "scopeguard", ] [[package]] name = "lodepng" -version = "3.4.3" +version = "3.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11443d177d97dc468ee5cc956769bbdeb4c20707d443c62dfd8b473505365613" +checksum = "e1f7ef1b146a329001ccc6ad5fc1def8300281dda5176e8336b7fd44e440fb96" dependencies = [ "fallible_collections", "flate2", @@ -2217,15 +2289,15 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" dependencies = [ "autocfg", ] @@ -2247,9 +2319,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209d075476da2e63b4b29e72a2ef627b840589588e71400a25e3565c4f849d07" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -2268,9 +2340,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c" dependencies = [ "migrations_internals", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -2279,16 +2351,6 @@ version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "miniz_oxide" version = "0.3.7" @@ -2300,9 +2362,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", "autocfg", @@ -2321,12 +2383,25 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow", + "miow 0.2.2", "net2", "slab", "winapi 0.2.8", ] +[[package]] +name = "mio" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +dependencies = [ + "libc", + "log", + "miow 0.3.7", + "ntapi", + "winapi 0.3.9", +] + [[package]] name = "mio-uds" version = "0.6.8" @@ -2335,7 +2410,7 @@ checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ "iovec", "libc", - "mio", + "mio 0.6.23", ] [[package]] @@ -2350,6 +2425,15 @@ dependencies = [ "ws2_32-sys", ] +[[package]] +name = "miow" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "native-tls" version = "0.2.7" @@ -2381,15 +2465,25 @@ dependencies = [ [[package]] name = "nom" -version = "6.1.0" +version = "6.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab6f70b46d6325aa300f1c7bb3d470127dfc27806d8ea6bf294ee0ce643ce2b1" +checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" dependencies = [ "bitvec", + "funty", "memchr", "version_check", ] +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "num-bigint" version = "0.2.6" @@ -2454,15 +2548,18 @@ dependencies = [ [[package]] name = "object" -version = "0.23.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" +checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7" +dependencies = [ + "memchr", +] [[package]] name = "once_cell" -version = "1.5.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" [[package]] name = "opaque-debug" @@ -2478,29 +2575,29 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.32" +version = "0.10.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" +checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885" dependencies = [ "bitflags", "cfg-if 1.0.0", "foreign-types", - "lazy_static", "libc", + "once_cell", "openssl-sys", ] [[package]] name = "openssl-probe" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "openssl-sys" -version = "0.9.60" +version = "0.9.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" +checksum = "7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d" dependencies = [ "autocfg", "cc", @@ -2522,23 +2619,23 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.1.57", + "redox_syscall", "smallvec", "winapi 0.3.9", ] [[package]] name = "pem" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c220d01f863d13d96ca82359d1e81e64a7c6bf0637bcde7b2349630addf0c6" +checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" dependencies = [ "base64 0.13.0", "once_cell", @@ -2578,9 +2675,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -2596,55 +2693,55 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" +checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f" dependencies = [ - "pin-project-internal 0.4.27", + "pin-project-internal 0.4.28", ] [[package]] name = "pin-project" -version = "1.0.4" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b70b68509f17aa2857863b6fa00bf21fc93674c7a8893de2f469f6aa7ca2f2" +checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4" dependencies = [ - "pin-project-internal 1.0.4", + "pin-project-internal 1.0.7", ] [[package]] name = "pin-project-internal" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" +checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "pin-project-internal" -version = "1.0.4" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa25a6393f22ce819b0f50e0be89287292fda8d425be38ee0ca14c4931d9e71" +checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "pin-project-lite" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" +checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" [[package]] name = "pin-utils" @@ -2692,9 +2789,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", "version_check", ] @@ -2704,8 +2801,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", + "proc-macro2 1.0.27", + "quote 1.0.9", "version_check", ] @@ -2732,11 +2829,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" dependencies = [ - "unicode-xid 0.2.1", + "unicode-xid 0.2.2", ] [[package]] @@ -2766,18 +2863,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ - "proc-macro2 1.0.24", + "proc-macro2 1.0.27", ] [[package]] name = "quoted_printable" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b080c5db639b292ac79cbd34be0cfc5d36694768d8341109634d90b86930e2" +checksum = "1238256b09923649ec89b08104c4dfe9f6cb2fea734a5db5384e44916d59e9c5" [[package]] name = "r2d2" @@ -2811,14 +2908,14 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" dependencies = [ "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.1", - "rand_hc 0.3.0", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", ] [[package]] @@ -2833,12 +2930,12 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.1", + "rand_core 0.6.3", ] [[package]] @@ -2852,11 +2949,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.3", ] [[package]] @@ -2870,18 +2967,18 @@ dependencies = [ [[package]] name = "rand_hc" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" dependencies = [ - "rand_core 0.6.1", + "rand_core 0.6.3", ] [[package]] name = "rayon" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" dependencies = [ "autocfg", "crossbeam-deque", @@ -2891,49 +2988,42 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ - "crossbeam-channel 0.5.0", + "crossbeam-channel 0.5.1", "crossbeam-deque", - "crossbeam-utils 0.8.1", + "crossbeam-utils 0.8.5", "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.57" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_syscall" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570" +checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.4.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] name = "regex-syntax" -version = "0.6.22" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "remove_dir_all" @@ -2946,12 +3036,12 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.10" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" +checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" dependencies = [ "base64 0.13.0", - "bytes 0.5.6", + "bytes 1.0.1", "encoding_rs", "futures-core", "futures-util", @@ -2964,15 +3054,14 @@ dependencies = [ "lazy_static", "log", "mime", - "mime_guess", "native-tls", "percent-encoding", - "pin-project-lite 0.2.4", + "pin-project-lite 0.2.6", "serde", "serde_json", "serde_urlencoded", - "tokio 0.2.25", - "tokio-tls", + "tokio 1.7.1", + "tokio-native-tls", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -2992,9 +3081,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.25" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287f3c3f8236abb92d8b7e36797f19159df4b58f0a658cc3fb6dd3004b1f3bd3" +checksum = "8fddb3b23626145d1776addfc307e1a1851f60ef6ca64f376bcb889697144cf0" dependencies = [ "bytemuck", ] @@ -3027,9 +3116,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.18" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" +checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" [[package]] name = "rustc_version" @@ -3092,9 +3181,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ "ring", "untrusted", @@ -3102,9 +3191,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.0.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" +checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" dependencies = [ "bitflags", "core-foundation", @@ -3115,9 +3204,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" +checksum = "7e4effb91b4b8b6fb7732e670b6cee160278ff8e6bf485c7805d9e319d76e284" dependencies = [ "core-foundation-sys", "libc", @@ -3140,29 +3229,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.123" +version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" +checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.123" +version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" +checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] name = "serde_json" -version = "1.0.61" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" dependencies = [ "indexmap", "itoa", @@ -3199,9 +3288,9 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2acd6defeddb41eb60bb468f8825d0cfd0c2a76bc03bfd235b6a1dc4f6a1ad5" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -3218,13 +3307,13 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b312c3731e3fe78a185e6b9b911a7aa715b8e31cce117975219aab2acf285d" +checksum = "8c4cfa741c5832d0ef7fab46cabed29c2aae926db0b11bb2069edd8db5e64e16" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpuid-bool", + "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -3237,13 +3326,13 @@ checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" [[package]] name = "sha2" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpuid-bool", + "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -3256,9 +3345,9 @@ checksum = "b6fa3938c99da4914afedd13bf3d79bcb6c277d1b2c398d23257a304d9e1b074" [[package]] name = "signal-hook-registry" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" dependencies = [ "libc", ] @@ -3276,9 +3365,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" [[package]] name = "smallvec" @@ -3297,6 +3386,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "socket2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "spin" version = "0.5.2" @@ -3305,9 +3404,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "standback" -version = "0.2.14" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66a8cff4fa24853fdf6b51f75c6d7f8206d7c75cab4e467bcd7f25c2b1febe0" +checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" dependencies = [ "version_check", ] @@ -3332,11 +3431,11 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", + "proc-macro2 1.0.27", + "quote 1.0.9", "serde", "serde_derive", - "syn 1.0.60", + "syn 1.0.73", ] [[package]] @@ -3346,13 +3445,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" dependencies = [ "base-x", - "proc-macro2 1.0.24", - "quote 1.0.8", + "proc-macro2 1.0.27", + "quote 1.0.9", "serde", "serde_derive", "serde_json", "sha1", - "syn 1.0.60", + "syn 1.0.73", ] [[package]] @@ -3369,20 +3468,20 @@ checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" [[package]] name = "strum" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c" +checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" [[package]] name = "strum_macros" -version = "0.20.1" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" +checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ "heck", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -3398,20 +3497,20 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.60" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" +checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "unicode-xid 0.2.1", + "proc-macro2 1.0.27", + "quote 1.0.9", + "unicode-xid 0.2.2", ] [[package]] name = "tap" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36474e732d1affd3a6ed582781b3683df3d0563714c59c39591e8ff707cf078e" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" @@ -3421,8 +3520,8 @@ checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ "cfg-if 1.0.0", "libc", - "rand 0.8.3", - "redox_syscall 0.2.4", + "rand 0.8.4", + "redox_syscall", "remove_dir_all", "winapi 0.3.9", ] @@ -3438,31 +3537,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" +checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" +checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", -] - -[[package]] -name = "thread_local" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8208a331e1cb318dd5bd76951d2b8fc48ca38a69f5f4e4af1b6a9f8c6236915" -dependencies = [ - "once_cell", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", ] [[package]] @@ -3481,7 +3571,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" dependencies = [ "jpeg-decoder", - "miniz_oxide 0.4.3", + "miniz_oxide 0.4.4", "weezl", ] @@ -3498,9 +3588,9 @@ dependencies = [ [[package]] name = "time" -version = "0.2.25" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1195b046942c221454c2539395f85413b33383a067449d78aab2b7b052a142f7" +checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" dependencies = [ "const_fn", "libc", @@ -3523,22 +3613,22 @@ dependencies = [ [[package]] name = "time-macros-impl" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" +checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.24", - "quote 1.0.8", + "proc-macro2 1.0.27", + "quote 1.0.9", "standback", - "syn 1.0.60", + "syn 1.0.73", ] [[package]] name = "tinyvec" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" +checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" dependencies = [ "tinyvec_macros", ] @@ -3562,9 +3652,9 @@ dependencies = [ "lazy_static", "libc", "memchr", - "mio", + "mio 0.6.23", "mio-uds", - "pin-project-lite 0.1.11", + "pin-project-lite 0.1.12", "signal-hook-registry", "slab", "winapi 0.3.9", @@ -3572,12 +3662,30 @@ dependencies = [ [[package]] name = "tokio" -version = "0.3.7" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46409491c9375a693ce7032101970a54f8a2010efb77e13f70788f0d84489e39" +checksum = "5fb2ed024293bb19f7a5dc54fe83bf86532a44c12a2bb8ba40d64a4509395ca2" dependencies = [ "autocfg", - "pin-project-lite 0.2.4", + "bytes 1.0.1", + "libc", + "memchr", + "mio 0.7.13", + "once_cell", + "parking_lot", + "pin-project-lite 0.2.6", + "signal-hook-registry", + "winapi 0.3.9", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio 1.7.1", ] [[package]] @@ -3592,16 +3700,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "tokio-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" -dependencies = [ - "native-tls", - "tokio 0.2.25", -] - [[package]] name = "tokio-util" version = "0.3.1" @@ -3613,10 +3711,24 @@ dependencies = [ "futures-io", "futures-sink", "log", - "pin-project-lite 0.1.11", + "pin-project-lite 0.1.12", "tokio 0.2.25", ] +[[package]] +name = "tokio-util" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" +dependencies = [ + "bytes 1.0.1", + "futures-core", + "futures-sink", + "log", + "pin-project-lite 0.2.6", + "tokio 1.7.1", +] + [[package]] name = "tower-service" version = "0.3.1" @@ -3625,43 +3737,43 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.4", + "pin-project-lite 0.2.6", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" dependencies = [ "lazy_static", ] [[package]] name = "tracing-futures" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ - "pin-project 0.4.27", + "pin-project 1.0.7", "tracing", ] [[package]] name = "trust-dns-proto" -version = "0.19.6" +version = "0.19.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53861fcb288a166aae4c508ae558ed18b53838db728d4d310aad08270a7d4c2b" +checksum = "1cad71a0c0d68ab9941d2fb6e82f8fb2e86d9945b94e1661dd0aaea2b88215a9" dependencies = [ "async-trait", - "backtrace", + "cfg-if 1.0.0", "enum-as-inner", "futures", "idna", @@ -3676,11 +3788,10 @@ dependencies = [ [[package]] name = "trust-dns-resolver" -version = "0.19.6" +version = "0.19.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6759e8efc40465547b0dfce9500d733c65f969a4cbbfbe3ccf68daaa46ef179e" +checksum = "710f593b371175db53a26d0b38ed2978fafb9e9e8d3868b1acd753ea18df0ceb" dependencies = [ - "backtrace", "cfg-if 0.1.10", "futures", "ipconfig", @@ -3702,9 +3813,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "twoway" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b40075910de3a912adbd80b5d8bad6ad10a23eeb1f5bf9d4006839e899ba5bc" +checksum = "c57ffb460d7c24cd6eda43694110189030a3d1dfe418416d9468fd1c1d290b47" dependencies = [ "memchr", "unchecked-index", @@ -3718,9 +3829,9 @@ checksum = "a9b2228007eba4120145f785df0f6c92ea538f5a3635a612ecf4e334c8c1446d" [[package]] name = "typenum" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" [[package]] name = "ucd-trie" @@ -3734,29 +3845,20 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eeba86d422ce181a719445e51872fa30f1f7413b62becb52e95ec91aa262d85c" -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" dependencies = [ "matches", ] [[package]] name = "unicode-normalization" -version = "0.1.16" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" dependencies = [ "tinyvec", ] @@ -3775,9 +3877,9 @@ checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] name = "unicode-xid" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "unicode_categories" @@ -3793,9 +3895,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", "idna", @@ -3810,21 +3912,21 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.3", "serde", ] [[package]] name = "vcpkg" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" [[package]] name = "want" @@ -3850,9 +3952,9 @@ checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasm-bindgen" -version = "0.2.70" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" +checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" dependencies = [ "cfg-if 1.0.0", "serde", @@ -3862,24 +3964,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.70" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" +checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.20" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94" +checksum = "5fba7978c679d53ce2d0ac80c8c175840feb849a161664365d1287b41f2e67f1" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3889,38 +3991,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.70" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" +checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" dependencies = [ - "quote 1.0.8", + "quote 1.0.9", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.70" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" +checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.8", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.70" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" +checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" [[package]] name = "web-sys" -version = "0.3.47" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" +checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582" dependencies = [ "js-sys", "wasm-bindgen", @@ -3947,9 +4049,9 @@ dependencies = [ [[package]] name = "weezl" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a32b378380f4e9869b22f0b5177c68a5519f03b3454fde0b291455ddbae266c" +checksum = "d8b77fdfd5a253be4ab714e4ffa3c49caf146b4de743e97510c0656cf90f1e8e" [[package]] name = "widestring" diff --git a/Cargo.toml b/Cargo.toml index 0fd838819..1c2319bb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,25 +40,25 @@ lemmy_db_views_actor = { path = "./crates/db_views_actor" } lemmy_api_common = { path = "crates/api_common" } lemmy_websocket = { path = "./crates/websocket" } lemmy_routes = { path = "./crates/routes" } -diesel = "1.4.5" +diesel = "1.4.7" diesel_migrations = "1.4.0" chrono = { version = "0.4.19", features = ["serde"] } -serde = { version = "1.0.123", features = ["derive"] } +serde = { version = "1.0.126", features = ["derive"] } actix = "0.10.0" actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] } log = "0.4.14" -env_logger = "0.8.2" -strum = "0.20.0" -url = { version = "2.2.1", features = ["serde"] } -openssl = "0.10.32" +env_logger = "0.8.4" +strum = "0.21.0" +url = { version = "2.2.2", features = ["serde"] } +openssl = "0.10.35" http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] } -tokio = "0.3.6" -anyhow = "1.0.38" -reqwest = { version = "0.10.10", features = ["json"] } -activitystreams = "0.7.0-alpha.10" -actix-rt = { version = "1.1.1", default-features = false } -serde_json = { version = "1.0.61", features = ["preserve_order"] } -clokwerk = "0.3.4" +tokio = { version = "1.7.1", features = ["sync"] } +anyhow = "1.0.41" +reqwest = { version = "0.11.4", features = ["json"] } +activitystreams = "0.7.0-alpha.11" +actix-rt = { version = "2.2.0", default-features = false } +serde_json = { version = "1.0.64", features = ["preserve_order"] } +clokwerk = "0.3.5" [dev-dependencies.cargo-husky] version = "1.5.0" diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml index 1aaa0528e..9a921c67a 100644 --- a/crates/api/Cargo.toml +++ b/crates/api/Cargo.toml @@ -18,33 +18,33 @@ lemmy_db_views_moderator = { path = "../db_views_moderator" } lemmy_db_views_actor = { path = "../db_views_actor" } lemmy_api_common = { path = "../api_common" } lemmy_websocket = { path = "../websocket" } -diesel = "1.4.5" -bcrypt = "0.9.0" +diesel = "1.4.7" +bcrypt = "0.10.0" chrono = { version = "0.4.19", features = ["serde"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } -serde = { version = "1.0.123", features = ["derive"] } -actix = "0.10.0" +serde_json = { version = "1.0.64", features = ["preserve_order"] } +serde = { version = "1.0.126", features = ["derive"] } +actix = "0.12.0" actix-web = { version = "3.3.2", default-features = false } -actix-rt = { version = "1.1.1", default-features = false } +actix-rt = { version = "2.2.0", default-features = false } awc = { version = "2.0.3", default-features = false } log = "0.4.14" -rand = "0.8.3" -strum = "0.20.0" -strum_macros = "0.20.1" +rand = "0.8.4" +strum = "0.21.0" +strum_macros = "0.21.1" lazy_static = "1.4.0" -url = { version = "2.2.1", features = ["serde"] } -openssl = "0.10.32" -http = "0.2.3" +url = { version = "2.2.2", features = ["serde"] } +openssl = "0.10.35" +http = "0.2.4" http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] } base64 = "0.13.0" -tokio = "0.3.6" -futures = "0.3.12" -itertools = "0.10.0" +tokio = "1.7.1" +futures = "0.3.15" +itertools = "0.10.1" uuid = { version = "0.8.2", features = ["serde", "v4"] } -sha2 = "0.9.3" -async-trait = "0.1.42" +sha2 = "0.9.5" +async-trait = "0.1.50" captcha = "0.0.8" -anyhow = "1.0.38" -thiserror = "1.0.23" -background-jobs = "0.8.0" -reqwest = { version = "0.10.10", features = ["json"] } +anyhow = "1.0.41" +thiserror = "1.0.25" +background-jobs = "0.9.0" +reqwest = { version = "0.11.4", features = ["json"] } diff --git a/crates/api/src/comment.rs b/crates/api/src/comment.rs index dd373cb10..ff1010fb1 100644 --- a/crates/api/src/comment.rs +++ b/crates/api/src/comment.rs @@ -23,12 +23,12 @@ impl Perform for MarkCommentAsRead { context: &Data, _websocket_id: Option, ) -> Result { - let data: &MarkCommentAsRead = &self; + let data: &MarkCommentAsRead = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let comment_id = data.comment_id; let orig_comment = blocking(context.pool(), move |conn| { - CommentView::read(&conn, comment_id, None) + CommentView::read(conn, comment_id, None) }) .await??; @@ -79,7 +79,7 @@ impl Perform for SaveComment { context: &Data, _websocket_id: Option, ) -> Result { - let data: &SaveComment = &self; + let data: &SaveComment = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let comment_saved_form = CommentSavedForm { @@ -123,7 +123,7 @@ impl Perform for CreateCommentLike { context: &Data, websocket_id: Option, ) -> Result { - let data: &CreateCommentLike = &self; + let data: &CreateCommentLike = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let mut recipient_ids = Vec::::new(); @@ -133,7 +133,7 @@ impl Perform for CreateCommentLike { let comment_id = data.comment_id; let orig_comment = blocking(context.pool(), move |conn| { - CommentView::read(&conn, comment_id, None) + CommentView::read(conn, comment_id, None) }) .await??; diff --git a/crates/api/src/comment_report.rs b/crates/api/src/comment_report.rs index 5cdf697c2..83aebfc52 100644 --- a/crates/api/src/comment_report.rs +++ b/crates/api/src/comment_report.rs @@ -31,7 +31,7 @@ impl Perform for CreateCommentReport { context: &Data, websocket_id: Option, ) -> Result { - let data: &CreateCommentReport = &self; + let data: &CreateCommentReport = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // check size of report and check for whitespace @@ -46,7 +46,7 @@ impl Perform for CreateCommentReport { let person_id = local_user_view.person.id; let comment_id = data.comment_id; let comment_view = blocking(context.pool(), move |conn| { - CommentView::read(&conn, comment_id, None) + CommentView::read(conn, comment_id, None) }) .await??; @@ -95,12 +95,12 @@ impl Perform for ResolveCommentReport { context: &Data, websocket_id: Option, ) -> Result { - let data: &ResolveCommentReport = &self; + let data: &ResolveCommentReport = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let report_id = data.report_id; let report = blocking(context.pool(), move |conn| { - CommentReportView::read(&conn, report_id) + CommentReportView::read(conn, report_id) }) .await??; @@ -148,7 +148,7 @@ impl Perform for ListCommentReports { context: &Data, websocket_id: Option, ) -> Result { - let data: &ListCommentReports = &self; + let data: &ListCommentReports = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let person_id = local_user_view.person.id; diff --git a/crates/api/src/community.rs b/crates/api/src/community.rs index b00160538..017ef8493 100644 --- a/crates/api/src/community.rs +++ b/crates/api/src/community.rs @@ -42,7 +42,7 @@ impl Perform for FollowCommunity { context: &Data, _websocket_id: Option, ) -> Result { - let data: &FollowCommunity = &self; + let data: &FollowCommunity = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let community_id = data.community_id; @@ -116,7 +116,7 @@ impl Perform for BanFromCommunity { context: &Data, websocket_id: Option, ) -> Result { - let data: &BanFromCommunity = &self; + let data: &BanFromCommunity = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let community_id = data.community_id; @@ -246,7 +246,7 @@ impl Perform for AddModToCommunity { context: &Data, websocket_id: Option, ) -> Result { - let data: &AddModToCommunity = &self; + let data: &AddModToCommunity = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let community_id = data.community_id; @@ -333,7 +333,7 @@ impl Perform for TransferCommunity { context: &Data, _websocket_id: Option, ) -> Result { - let data: &TransferCommunity = &self; + let data: &TransferCommunity = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let site_creator_id = blocking(context.pool(), move |conn| { diff --git a/crates/api/src/lib.rs b/crates/api/src/lib.rs index 0ba3fbea2..6234e7565 100644 --- a/crates/api/src/lib.rs +++ b/crates/api/src/lib.rs @@ -154,7 +154,7 @@ where for<'de> Data: Deserialize<'de> + 'a, Data: Perform, { - let parsed_data: Data = serde_json::from_str(&data)?; + let parsed_data: Data = serde_json::from_str(data)?; let res = parsed_data .perform(&web::Data::new(context), Some(id)) .await?; @@ -212,7 +212,7 @@ mod tests { // The check should fail, since the validator time is now newer than the jwt issue time let updated_local_user = - LocalUser::update_password(&conn, inserted_local_user.id, &"password111").unwrap(); + LocalUser::update_password(&conn, inserted_local_user.id, "password111").unwrap(); let check_after = check_validator_time(&updated_local_user.validator_time, &claims); assert!(check_after.is_err()); diff --git a/crates/api/src/local_user.rs b/crates/api/src/local_user.rs index 7fb4b83f9..47d87d3f6 100644 --- a/crates/api/src/local_user.rs +++ b/crates/api/src/local_user.rs @@ -79,7 +79,7 @@ impl Perform for Login { context: &Data, _websocket_id: Option, ) -> Result { - let data: &Login = &self; + let data: &Login = self; // Fetch that username / email let username_or_email = data.username_or_email.clone(); @@ -160,7 +160,7 @@ impl Perform for SaveUserSettings { context: &Data, _websocket_id: Option, ) -> Result { - let data: &SaveUserSettings = &self; + let data: &SaveUserSettings = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let avatar = diesel_option_overwrite_to_url(&data.avatar)?; @@ -279,7 +279,7 @@ impl Perform for ChangePassword { context: &Data, _websocket_id: Option, ) -> Result { - let data: &ChangePassword = &self; + let data: &ChangePassword = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; password_length_check(&data.new_password)?; @@ -322,7 +322,7 @@ impl Perform for AddAdmin { context: &Data, websocket_id: Option, ) -> Result { - let data: &AddAdmin = &self; + let data: &AddAdmin = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Make sure user is an admin @@ -384,7 +384,7 @@ impl Perform for BanPerson { context: &Data, websocket_id: Option, ) -> Result { - let data: &BanPerson = &self; + let data: &BanPerson = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Make sure user is an admin @@ -460,7 +460,7 @@ impl Perform for GetReplies { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetReplies = &self; + let data: &GetReplies = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let sort: Option = from_opt_str_to_opt_enum(&data.sort); @@ -497,7 +497,7 @@ impl Perform for GetPersonMentions { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetPersonMentions = &self; + let data: &GetPersonMentions = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let sort: Option = from_opt_str_to_opt_enum(&data.sort); @@ -531,7 +531,7 @@ impl Perform for MarkPersonMentionAsRead { context: &Data, _websocket_id: Option, ) -> Result { - let data: &MarkPersonMentionAsRead = &self; + let data: &MarkPersonMentionAsRead = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let person_mention_id = data.person_mention_id; @@ -574,7 +574,7 @@ impl Perform for MarkAllAsRead { context: &Data, _websocket_id: Option, ) -> Result { - let data: &MarkAllAsRead = &self; + let data: &MarkAllAsRead = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let person_id = local_user_view.person.id; @@ -629,7 +629,7 @@ impl Perform for PasswordReset { context: &Data, _websocket_id: Option, ) -> Result { - let data: &PasswordReset = &self; + let data: &PasswordReset = self; // Fetch that email let email = data.email.clone(); @@ -672,7 +672,7 @@ impl Perform for PasswordChange { context: &Data, _websocket_id: Option, ) -> Result { - let data: &PasswordChange = &self; + let data: &PasswordChange = self; // Fetch the user_id from the token let token = data.token.clone(); @@ -712,7 +712,7 @@ impl Perform for GetReportCount { context: &Data, websocket_id: Option, ) -> Result { - let data: &GetReportCount = &self; + let data: &GetReportCount = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let person_id = local_user_view.person.id; @@ -768,7 +768,7 @@ impl Perform for GetFollowedCommunities { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetFollowedCommunities = &self; + let data: &GetFollowedCommunities = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let person_id = local_user_view.person.id; diff --git a/crates/api/src/post.rs b/crates/api/src/post.rs index f0e4d91fa..4a55b7e05 100644 --- a/crates/api/src/post.rs +++ b/crates/api/src/post.rs @@ -25,7 +25,7 @@ impl Perform for CreatePostLike { context: &Data, websocket_id: Option, ) -> Result { - let data: &CreatePostLike = &self; + let data: &CreatePostLike = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Don't do a downvote if site has downvotes disabled @@ -102,7 +102,7 @@ impl Perform for LockPost { context: &Data, websocket_id: Option, ) -> Result { - let data: &LockPost = &self; + let data: &LockPost = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let post_id = data.post_id; @@ -172,7 +172,7 @@ impl Perform for StickyPost { context: &Data, websocket_id: Option, ) -> Result { - let data: &StickyPost = &self; + let data: &StickyPost = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let post_id = data.post_id; @@ -246,7 +246,7 @@ impl Perform for SavePost { context: &Data, _websocket_id: Option, ) -> Result { - let data: &SavePost = &self; + let data: &SavePost = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let post_saved_form = PostSavedForm { diff --git a/crates/api/src/post_report.rs b/crates/api/src/post_report.rs index b2ebbaf24..e718b775a 100644 --- a/crates/api/src/post_report.rs +++ b/crates/api/src/post_report.rs @@ -38,7 +38,7 @@ impl Perform for CreatePostReport { context: &Data, websocket_id: Option, ) -> Result { - let data: &CreatePostReport = &self; + let data: &CreatePostReport = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // check size of report and check for whitespace @@ -53,7 +53,7 @@ impl Perform for CreatePostReport { let person_id = local_user_view.person.id; let post_id = data.post_id; let post_view = blocking(context.pool(), move |conn| { - PostView::read(&conn, post_id, None) + PostView::read(conn, post_id, None) }) .await??; @@ -104,12 +104,12 @@ impl Perform for ResolvePostReport { context: &Data, websocket_id: Option, ) -> Result { - let data: &ResolvePostReport = &self; + let data: &ResolvePostReport = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let report_id = data.report_id; let report = blocking(context.pool(), move |conn| { - PostReportView::read(&conn, report_id) + PostReportView::read(conn, report_id) }) .await??; @@ -156,7 +156,7 @@ impl Perform for ListPostReports { context: &Data, websocket_id: Option, ) -> Result { - let data: &ListPostReports = &self; + let data: &ListPostReports = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let person_id = local_user_view.person.id; diff --git a/crates/api/src/private_message.rs b/crates/api/src/private_message.rs index d0163dcf1..54bc3eb0c 100644 --- a/crates/api/src/private_message.rs +++ b/crates/api/src/private_message.rs @@ -20,7 +20,7 @@ impl Perform for MarkPrivateMessageAsRead { context: &Data, websocket_id: Option, ) -> Result { - let data: &MarkPrivateMessageAsRead = &self; + let data: &MarkPrivateMessageAsRead = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Checking permissions diff --git a/crates/api/src/site.rs b/crates/api/src/site.rs index dab458304..53f9bd305 100644 --- a/crates/api/src/site.rs +++ b/crates/api/src/site.rs @@ -60,7 +60,7 @@ impl Perform for GetModlog { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetModlog = &self; + let data: &GetModlog = self; let community_id = data.community_id; let mod_person_id = data.mod_person_id; @@ -134,7 +134,7 @@ impl Perform for Search { context: &Data, _websocket_id: Option, ) -> Result { - let data: &Search = &self; + let data: &Search = self; match search_by_apub_id(&data.q, context).await { Ok(r) => return Ok(r), @@ -191,7 +191,7 @@ impl Perform for Search { } SearchType::Comments => { comments = blocking(context.pool(), move |conn| { - CommentQueryBuilder::create(&conn) + CommentQueryBuilder::create(conn) .sort(sort) .listing_type(listing_type) .search_term(q) @@ -347,7 +347,7 @@ impl Perform for TransferSite { context: &Data, _websocket_id: Option, ) -> Result { - let data: &TransferSite = &self; + let data: &TransferSite = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; is_admin(&local_user_view)?; @@ -410,7 +410,7 @@ impl Perform for GetSiteConfig { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetSiteConfig = &self; + let data: &GetSiteConfig = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Only let admins read this @@ -431,7 +431,7 @@ impl Perform for SaveSiteConfig { context: &Data, _websocket_id: Option, ) -> Result { - let data: &SaveSiteConfig = &self; + let data: &SaveSiteConfig = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Only let admins read this diff --git a/crates/api/src/websocket.rs b/crates/api/src/websocket.rs index 683b4c4d4..e69ffdd24 100644 --- a/crates/api/src/websocket.rs +++ b/crates/api/src/websocket.rs @@ -16,7 +16,7 @@ impl Perform for UserJoin { context: &Data, websocket_id: Option, ) -> Result { - let data: &UserJoin = &self; + let data: &UserJoin = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; if let Some(ws_id) = websocket_id { @@ -39,7 +39,7 @@ impl Perform for CommunityJoin { context: &Data, websocket_id: Option, ) -> Result { - let data: &CommunityJoin = &self; + let data: &CommunityJoin = self; if let Some(ws_id) = websocket_id { context.chat_server().do_send(JoinCommunityRoom { @@ -61,7 +61,7 @@ impl Perform for ModJoin { context: &Data, websocket_id: Option, ) -> Result { - let data: &ModJoin = &self; + let data: &ModJoin = self; if let Some(ws_id) = websocket_id { context.chat_server().do_send(JoinModRoom { @@ -83,7 +83,7 @@ impl Perform for PostJoin { context: &Data, websocket_id: Option, ) -> Result { - let data: &PostJoin = &self; + let data: &PostJoin = self; if let Some(ws_id) = websocket_id { context.chat_server().do_send(JoinPostRoom { diff --git a/crates/api_common/Cargo.toml b/crates/api_common/Cargo.toml index f870a2668..f7510a459 100644 --- a/crates/api_common/Cargo.toml +++ b/crates/api_common/Cargo.toml @@ -15,10 +15,10 @@ lemmy_db_views_moderator = { path = "../db_views_moderator" } lemmy_db_views_actor = { path = "../db_views_actor" } lemmy_db_schema = { path = "../db_schema" } lemmy_utils = { path = "../utils" } -serde = { version = "1.0.123", features = ["derive"] } +serde = { version = "1.0.126", features = ["derive"] } log = "0.4.14" -diesel = "1.4.5" +diesel = "1.4.7" actix-web = "3.3.2" chrono = { version = "0.4.19", features = ["serde"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } -url = "2.2.1" +serde_json = { version = "1.0.64", features = ["preserve_order"] } +url = "2.2.2" diff --git a/crates/api_common/src/lib.rs b/crates/api_common/src/lib.rs index f2b41be50..c59bc500b 100644 --- a/crates/api_common/src/lib.rs +++ b/crates/api_common/src/lib.rs @@ -112,7 +112,7 @@ fn do_send_local_notifs( .filter(|m| m.is_local() && m.name.ne(&person.name)) .collect::>() { - if let Ok(mention_user_view) = LocalUserView::read_from_name(&conn, &mention.name) { + if let Ok(mention_user_view) = LocalUserView::read_from_name(conn, &mention.name) { // TODO // At some point, make it so you can't tag the parent creator either // This can cause two notifications, one for reply and the other for mention @@ -126,7 +126,7 @@ fn do_send_local_notifs( // Allow this to fail softly, since comment edits might re-update or replace it // Let the uniqueness handle this fail - PersonMention::create(&conn, &user_mention_form).ok(); + PersonMention::create(conn, &user_mention_form).ok(); // Send an email to those local users that have notifications on if do_send_email { @@ -143,11 +143,11 @@ fn do_send_local_notifs( // Send notifs to the parent commenter / poster match comment.parent_id { Some(parent_id) => { - if let Ok(parent_comment) = Comment::read(&conn, parent_id) { + if let Ok(parent_comment) = Comment::read(conn, parent_id) { // Don't send a notif to yourself if parent_comment.creator_id != person.id { // Get the parent commenter local_user - if let Ok(parent_user_view) = LocalUserView::read_person(&conn, parent_comment.creator_id) + if let Ok(parent_user_view) = LocalUserView::read_person(conn, parent_comment.creator_id) { recipient_ids.push(parent_user_view.local_user.id); @@ -166,7 +166,7 @@ fn do_send_local_notifs( // Its a post None => { if post.creator_id != person.id { - if let Ok(parent_user_view) = LocalUserView::read_person(&conn, post.creator_id) { + if let Ok(parent_user_view) = LocalUserView::read_person(conn, post.creator_id) { recipient_ids.push(parent_user_view.local_user.id); if do_send_email { @@ -208,7 +208,7 @@ pub fn send_email_to_user( comment_content, Settings::get().get_protocol_and_hostname() ); - match send_email(subject, &user_email, &local_user_view.person.name, html) { + match send_email(subject, user_email, &local_user_view.person.name, html) { Ok(_o) => _o, Err(e) => error!("{}", e), }; @@ -261,7 +261,7 @@ pub async fn get_local_user_view_from_jwt( jwt: &str, pool: &DbPool, ) -> Result { - let claims = Claims::decode(&jwt) + let claims = Claims::decode(jwt) .map_err(|_| ApiError::err("not_logged_in"))? .claims; let local_user_id = LocalUserId(claims.sub); @@ -304,7 +304,7 @@ pub async fn get_local_user_settings_view_from_jwt( jwt: &str, pool: &DbPool, ) -> Result { - let claims = Claims::decode(&jwt) + let claims = Claims::decode(jwt) .map_err(|_| ApiError::err("not_logged_in"))? .claims; let local_user_id = LocalUserId(claims.sub); diff --git a/crates/api_crud/Cargo.toml b/crates/api_crud/Cargo.toml index deebc12fa..10b0f63bb 100644 --- a/crates/api_crud/Cargo.toml +++ b/crates/api_crud/Cargo.toml @@ -13,32 +13,32 @@ lemmy_db_views_moderator = { path = "../db_views_moderator" } lemmy_db_views_actor = { path = "../db_views_actor" } lemmy_api_common = { path = "../api_common" } lemmy_websocket = { path = "../websocket" } -diesel = "1.4.5" -bcrypt = "0.9.0" +diesel = "1.4.7" +bcrypt = "0.10.0" chrono = { version = "0.4.19", features = ["serde"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } -serde = { version = "1.0.123", features = ["derive"] } -actix = "0.10.0" +serde_json = { version = "1.0.64", features = ["preserve_order"] } +serde = { version = "1.0.126", features = ["derive"] } +actix = "0.12.0" actix-web = { version = "3.3.2", default-features = false } -actix-rt = { version = "1.1.1", default-features = false } +actix-rt = { version = "2.2.0", default-features = false } awc = { version = "2.0.3", default-features = false } log = "0.4.14" -rand = "0.8.3" -strum = "0.20.0" -strum_macros = "0.20.1" +rand = "0.8.4" +strum = "0.21.0" +strum_macros = "0.21.1" lazy_static = "1.4.0" -url = { version = "2.2.1", features = ["serde"] } -openssl = "0.10.32" -http = "0.2.3" +url = { version = "2.2.2", features = ["serde"] } +openssl = "0.10.35" +http = "0.2.4" http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] } base64 = "0.13.0" -tokio = "0.3.6" -futures = "0.3.12" -itertools = "0.10.0" +tokio = "1.7.1" +futures = "0.3.15" +itertools = "0.10.1" uuid = { version = "0.8.2", features = ["serde", "v4"] } -sha2 = "0.9.3" -async-trait = "0.1.42" -anyhow = "1.0.38" -thiserror = "1.0.23" -background-jobs = "0.8.0" -reqwest = { version = "0.10.10", features = ["json"] } +sha2 = "0.9.5" +async-trait = "0.1.50" +anyhow = "1.0.41" +thiserror = "1.0.25" +background-jobs = "0.9.0" +reqwest = { version = "0.11.4", features = ["json"] } diff --git a/crates/api_crud/src/comment/create.rs b/crates/api_crud/src/comment/create.rs index 4f1037c3f..7923b0836 100644 --- a/crates/api_crud/src/comment/create.rs +++ b/crates/api_crud/src/comment/create.rs @@ -29,7 +29,7 @@ impl PerformCrud for CreateComment { context: &Data, websocket_id: Option, ) -> Result { - let data: &CreateComment = &self; + let data: &CreateComment = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let content_slurs_removed = remove_slurs(&data.content.to_owned()); @@ -48,7 +48,7 @@ impl PerformCrud for CreateComment { // If there's a parent_id, check to make sure that comment is in that post if let Some(parent_id) = data.parent_id { // Make sure the parent comment exists - let parent = blocking(context.pool(), move |conn| Comment::read(&conn, parent_id)) + let parent = blocking(context.pool(), move |conn| Comment::read(conn, parent_id)) .await? .map_err(|_| ApiError::err("couldnt_create_comment"))?; if parent.post_id != post_id { @@ -67,7 +67,7 @@ impl PerformCrud for CreateComment { // Create the comment let comment_form2 = comment_form.clone(); let inserted_comment = blocking(context.pool(), move |conn| { - Comment::create(&conn, &comment_form2) + Comment::create(conn, &comment_form2) }) .await? .map_err(|_| ApiError::err("couldnt_create_comment"))?; @@ -78,7 +78,7 @@ impl PerformCrud for CreateComment { blocking(context.pool(), move |conn| -> Result { let apub_id = generate_apub_endpoint(EndpointType::Comment, &inserted_comment_id.to_string())?; - Ok(Comment::update_ap_id(&conn, inserted_comment_id, apub_id)?) + Ok(Comment::update_ap_id(conn, inserted_comment_id, apub_id)?) }) .await? .map_err(|_| ApiError::err("couldnt_create_comment"))?; @@ -108,7 +108,7 @@ impl PerformCrud for CreateComment { score: 1, }; - let like = move |conn: &'_ _| CommentLike::like(&conn, &like_form); + let like = move |conn: &'_ _| CommentLike::like(conn, &like_form); if blocking(context.pool(), like).await?.is_err() { return Err(ApiError::err("couldnt_like_comment").into()); } @@ -119,7 +119,7 @@ impl PerformCrud for CreateComment { let person_id = local_user_view.person.id; let mut comment_view = blocking(context.pool(), move |conn| { - CommentView::read(&conn, inserted_comment.id, Some(person_id)) + CommentView::read(conn, inserted_comment.id, Some(person_id)) }) .await??; diff --git a/crates/api_crud/src/comment/delete.rs b/crates/api_crud/src/comment/delete.rs index 8f9280965..f58f3b0e4 100644 --- a/crates/api_crud/src/comment/delete.rs +++ b/crates/api_crud/src/comment/delete.rs @@ -24,12 +24,12 @@ impl PerformCrud for DeleteComment { context: &Data, websocket_id: Option, ) -> Result { - let data: &DeleteComment = &self; + let data: &DeleteComment = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let comment_id = data.comment_id; let orig_comment = blocking(context.pool(), move |conn| { - CommentView::read(&conn, comment_id, None) + CommentView::read(conn, comment_id, None) }) .await??; @@ -110,12 +110,12 @@ impl PerformCrud for RemoveComment { context: &Data, websocket_id: Option, ) -> Result { - let data: &RemoveComment = &self; + let data: &RemoveComment = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let comment_id = data.comment_id; let orig_comment = blocking(context.pool(), move |conn| { - CommentView::read(&conn, comment_id, None) + CommentView::read(conn, comment_id, None) }) .await??; diff --git a/crates/api_crud/src/comment/read.rs b/crates/api_crud/src/comment/read.rs index 12ccbd5a1..767311d2a 100644 --- a/crates/api_crud/src/comment/read.rs +++ b/crates/api_crud/src/comment/read.rs @@ -15,7 +15,7 @@ impl PerformCrud for GetComments { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetComments = &self; + let data: &GetComments = self; let local_user_view = get_local_user_view_from_jwt_opt(&data.auth, context.pool()).await?; let show_bot_accounts = local_user_view diff --git a/crates/api_crud/src/comment/update.rs b/crates/api_crud/src/comment/update.rs index e26a9884e..e6ed6ab59 100644 --- a/crates/api_crud/src/comment/update.rs +++ b/crates/api_crud/src/comment/update.rs @@ -28,12 +28,12 @@ impl PerformCrud for EditComment { context: &Data, websocket_id: Option, ) -> Result { - let data: &EditComment = &self; + let data: &EditComment = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let comment_id = data.comment_id; let orig_comment = blocking(context.pool(), move |conn| { - CommentView::read(&conn, comment_id, None) + CommentView::read(conn, comment_id, None) }) .await??; diff --git a/crates/api_crud/src/community/create.rs b/crates/api_crud/src/community/create.rs index 88f4415bf..5c55e149e 100644 --- a/crates/api_crud/src/community/create.rs +++ b/crates/api_crud/src/community/create.rs @@ -44,7 +44,7 @@ impl PerformCrud for CreateCommunity { context: &Data, _websocket_id: Option, ) -> Result { - let data: &CreateCommunity = &self; + let data: &CreateCommunity = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let site = blocking(context.pool(), move |conn| Site::read(conn, 0)).await??; diff --git a/crates/api_crud/src/community/delete.rs b/crates/api_crud/src/community/delete.rs index 9511a2caa..2208a348b 100644 --- a/crates/api_crud/src/community/delete.rs +++ b/crates/api_crud/src/community/delete.rs @@ -23,7 +23,7 @@ impl PerformCrud for DeleteCommunity { context: &Data, websocket_id: Option, ) -> Result { - let data: &DeleteCommunity = &self; + let data: &DeleteCommunity = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Fetch the community mods @@ -87,7 +87,7 @@ impl PerformCrud for RemoveCommunity { context: &Data, websocket_id: Option, ) -> Result { - let data: &RemoveCommunity = &self; + let data: &RemoveCommunity = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Verify its an admin (only an admin can remove a community) diff --git a/crates/api_crud/src/community/read.rs b/crates/api_crud/src/community/read.rs index 7836878e9..eb11cb397 100644 --- a/crates/api_crud/src/community/read.rs +++ b/crates/api_crud/src/community/read.rs @@ -24,7 +24,7 @@ impl PerformCrud for GetCommunity { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetCommunity = &self; + let data: &GetCommunity = self; let local_user_view = get_local_user_view_from_jwt_opt(&data.auth, context.pool()).await?; let person_id = local_user_view.map(|u| u.person.id); @@ -79,7 +79,7 @@ impl PerformCrud for ListCommunities { context: &Data, _websocket_id: Option, ) -> Result { - let data: &ListCommunities = &self; + let data: &ListCommunities = self; let local_user_view = get_local_user_view_from_jwt_opt(&data.auth, context.pool()).await?; let person_id = local_user_view.to_owned().map(|l| l.person.id); diff --git a/crates/api_crud/src/community/update.rs b/crates/api_crud/src/community/update.rs index f28f77119..b17a223ee 100644 --- a/crates/api_crud/src/community/update.rs +++ b/crates/api_crud/src/community/update.rs @@ -28,7 +28,7 @@ impl PerformCrud for EditCommunity { context: &Data, websocket_id: Option, ) -> Result { - let data: &EditCommunity = &self; + let data: &EditCommunity = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; check_slurs_opt(&data.title)?; diff --git a/crates/api_crud/src/lib.rs b/crates/api_crud/src/lib.rs index c6385d050..f77632f90 100644 --- a/crates/api_crud/src/lib.rs +++ b/crates/api_crud/src/lib.rs @@ -124,7 +124,7 @@ where for<'de> Data: Deserialize<'de> + 'a, Data: PerformCrud, { - let parsed_data: Data = serde_json::from_str(&data)?; + let parsed_data: Data = serde_json::from_str(data)?; let res = parsed_data .perform(&web::Data::new(context), Some(id)) .await?; diff --git a/crates/api_crud/src/post/create.rs b/crates/api_crud/src/post/create.rs index 835518a14..025e436b1 100644 --- a/crates/api_crud/src/post/create.rs +++ b/crates/api_crud/src/post/create.rs @@ -29,7 +29,7 @@ impl PerformCrud for CreatePost { context: &Data, websocket_id: Option, ) -> Result { - let data: &CreatePost = &self; + let data: &CreatePost = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; check_slurs(&data.name)?; diff --git a/crates/api_crud/src/post/delete.rs b/crates/api_crud/src/post/delete.rs index 32b4e9ff0..e7fcb2fd6 100644 --- a/crates/api_crud/src/post/delete.rs +++ b/crates/api_crud/src/post/delete.rs @@ -23,7 +23,7 @@ impl PerformCrud for DeletePost { context: &Data, websocket_id: Option, ) -> Result { - let data: &DeletePost = &self; + let data: &DeletePost = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let post_id = data.post_id; @@ -88,7 +88,7 @@ impl PerformCrud for RemovePost { context: &Data, websocket_id: Option, ) -> Result { - let data: &RemovePost = &self; + let data: &RemovePost = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let post_id = data.post_id; diff --git a/crates/api_crud/src/post/read.rs b/crates/api_crud/src/post/read.rs index d49764bba..4a25b3a8d 100644 --- a/crates/api_crud/src/post/read.rs +++ b/crates/api_crud/src/post/read.rs @@ -22,7 +22,7 @@ impl PerformCrud for GetPost { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetPost = &self; + let data: &GetPost = self; let local_user_view = get_local_user_view_from_jwt_opt(&data.auth, context.pool()).await?; let show_bot_accounts = local_user_view @@ -92,7 +92,7 @@ impl PerformCrud for GetPosts { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetPosts = &self; + let data: &GetPosts = self; let local_user_view = get_local_user_view_from_jwt_opt(&data.auth, context.pool()).await?; let person_id = local_user_view.to_owned().map(|l| l.person.id); diff --git a/crates/api_crud/src/post/update.rs b/crates/api_crud/src/post/update.rs index ca7634d5a..dcf2c95a8 100644 --- a/crates/api_crud/src/post/update.rs +++ b/crates/api_crud/src/post/update.rs @@ -23,7 +23,7 @@ impl PerformCrud for EditPost { context: &Data, websocket_id: Option, ) -> Result { - let data: &EditPost = &self; + let data: &EditPost = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; check_slurs_opt(&data.name)?; diff --git a/crates/api_crud/src/private_message/create.rs b/crates/api_crud/src/private_message/create.rs index 2dc223ec0..3e3074ad8 100644 --- a/crates/api_crud/src/private_message/create.rs +++ b/crates/api_crud/src/private_message/create.rs @@ -22,7 +22,7 @@ impl PerformCrud for CreatePrivateMessage { context: &Data, websocket_id: Option, ) -> Result { - let data: &CreatePrivateMessage = &self; + let data: &CreatePrivateMessage = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let content_slurs_removed = remove_slurs(&data.content.to_owned()); @@ -54,7 +54,7 @@ impl PerformCrud for CreatePrivateMessage { &inserted_private_message_id.to_string(), )?; Ok(PrivateMessage::update_ap_id( - &conn, + conn, inserted_private_message_id, apub_id, )?) diff --git a/crates/api_crud/src/private_message/delete.rs b/crates/api_crud/src/private_message/delete.rs index 65c0022ce..6befb75da 100644 --- a/crates/api_crud/src/private_message/delete.rs +++ b/crates/api_crud/src/private_message/delete.rs @@ -21,7 +21,7 @@ impl PerformCrud for DeletePrivateMessage { context: &Data, websocket_id: Option, ) -> Result { - let data: &DeletePrivateMessage = &self; + let data: &DeletePrivateMessage = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Checking permissions diff --git a/crates/api_crud/src/private_message/read.rs b/crates/api_crud/src/private_message/read.rs index 79bc85f45..6706bf419 100644 --- a/crates/api_crud/src/private_message/read.rs +++ b/crates/api_crud/src/private_message/read.rs @@ -18,7 +18,7 @@ impl PerformCrud for GetPrivateMessages { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetPrivateMessages = &self; + let data: &GetPrivateMessages = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; let person_id = local_user_view.person.id; @@ -26,7 +26,7 @@ impl PerformCrud for GetPrivateMessages { let limit = data.limit; let unread_only = data.unread_only; let messages = blocking(context.pool(), move |conn| { - PrivateMessageQueryBuilder::create(&conn, person_id) + PrivateMessageQueryBuilder::create(conn, person_id) .page(page) .limit(limit) .unread_only(unread_only) diff --git a/crates/api_crud/src/private_message/update.rs b/crates/api_crud/src/private_message/update.rs index b073c928c..35a9806a8 100644 --- a/crates/api_crud/src/private_message/update.rs +++ b/crates/api_crud/src/private_message/update.rs @@ -21,7 +21,7 @@ impl PerformCrud for EditPrivateMessage { context: &Data, websocket_id: Option, ) -> Result { - let data: &EditPrivateMessage = &self; + let data: &EditPrivateMessage = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Checking permissions diff --git a/crates/api_crud/src/site/create.rs b/crates/api_crud/src/site/create.rs index 2b876c2ff..b84adcdb4 100644 --- a/crates/api_crud/src/site/create.rs +++ b/crates/api_crud/src/site/create.rs @@ -32,7 +32,7 @@ impl PerformCrud for CreateSite { context: &Data, _websocket_id: Option, ) -> Result { - let data: &CreateSite = &self; + let data: &CreateSite = self; let read_site = move |conn: &'_ _| Site::read_simple(conn); if blocking(context.pool(), read_site).await?.is_ok() { diff --git a/crates/api_crud/src/site/read.rs b/crates/api_crud/src/site/read.rs index 9b73c12f8..da379e322 100644 --- a/crates/api_crud/src/site/read.rs +++ b/crates/api_crud/src/site/read.rs @@ -22,7 +22,7 @@ impl PerformCrud for GetSite { context: &Data, websocket_id: Option, ) -> Result { - let data: &GetSite = &self; + let data: &GetSite = self; let site_view = match blocking(context.pool(), move |conn| SiteView::read(conn)).await? { Ok(site_view) => Some(site_view), diff --git a/crates/api_crud/src/site/update.rs b/crates/api_crud/src/site/update.rs index 14716e782..781ea0081 100644 --- a/crates/api_crud/src/site/update.rs +++ b/crates/api_crud/src/site/update.rs @@ -29,7 +29,7 @@ impl PerformCrud for EditSite { context: &Data, websocket_id: Option, ) -> Result { - let data: &EditSite = &self; + let data: &EditSite = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; check_slurs_opt(&data.name)?; diff --git a/crates/api_crud/src/user/create.rs b/crates/api_crud/src/user/create.rs index d7aae65f0..ec227fefa 100644 --- a/crates/api_crud/src/user/create.rs +++ b/crates/api_crud/src/user/create.rs @@ -46,7 +46,7 @@ impl PerformCrud for Register { context: &Data, _websocket_id: Option, ) -> Result { - let data: &Register = &self; + let data: &Register = self; // Make sure site has open registration if let Ok(site) = blocking(context.pool(), move |conn| Site::read_simple(conn)).await? { @@ -151,7 +151,7 @@ impl PerformCrud for Register { // If the local user creation errored, then delete that person blocking(context.pool(), move |conn| { - Person::delete(&conn, inserted_person.id) + Person::delete(conn, inserted_person.id) }) .await??; diff --git a/crates/api_crud/src/user/delete.rs b/crates/api_crud/src/user/delete.rs index ca88830c3..fb9480dc7 100644 --- a/crates/api_crud/src/user/delete.rs +++ b/crates/api_crud/src/user/delete.rs @@ -16,7 +16,7 @@ impl PerformCrud for DeleteAccount { context: &Data, _websocket_id: Option, ) -> Result { - let data: &DeleteAccount = &self; + let data: &DeleteAccount = self; let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?; // Verify the password diff --git a/crates/api_crud/src/user/read.rs b/crates/api_crud/src/user/read.rs index 132bdd78f..f7275ef70 100644 --- a/crates/api_crud/src/user/read.rs +++ b/crates/api_crud/src/user/read.rs @@ -21,7 +21,7 @@ impl PerformCrud for GetPersonDetails { context: &Data, _websocket_id: Option, ) -> Result { - let data: &GetPersonDetails = &self; + let data: &GetPersonDetails = self; let local_user_view = get_local_user_view_from_jwt_opt(&data.auth, context.pool()).await?; let show_nsfw = local_user_view.as_ref().map(|t| t.local_user.show_nsfw); diff --git a/crates/apub/Cargo.toml b/crates/apub/Cargo.toml index 7d413f851..aa0eeadcd 100644 --- a/crates/apub/Cargo.toml +++ b/crates/apub/Cargo.toml @@ -16,37 +16,37 @@ lemmy_db_views = { path = "../db_views" } lemmy_db_views_actor = { path = "../db_views_actor" } lemmy_api_common = { path = "../api_common" } lemmy_websocket = { path = "../websocket" } -diesel = "1.4.5" +diesel = "1.4.7" activitystreams = "0.7.0-alpha.11" activitystreams-ext = "0.1.0-alpha.2" -bcrypt = "0.9.0" +bcrypt = "0.10.0" chrono = { version = "0.4.19", features = ["serde"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } -serde = { version = "1.0.123", features = ["derive"] } -actix = "0.10.0" +serde_json = { version = "1.0.64", features = ["preserve_order"] } +serde = { version = "1.0.126", features = ["derive"] } +actix = "0.12.0" actix-web = { version = "3.3.2", default-features = false } -actix-rt = { version = "1.1.1", default-features = false } +actix-rt = { version = "2.2.0", default-features = false } awc = { version = "2.0.3", default-features = false } log = "0.4.14" -rand = "0.8.3" -strum = "0.20.0" -strum_macros = "0.20.1" +rand = "0.8.4" +strum = "0.21.0" +strum_macros = "0.21.1" lazy_static = "1.4.0" -url = { version = "2.2.1", features = ["serde"] } +url = { version = "2.2.2", features = ["serde"] } percent-encoding = "2.1.0" -openssl = "0.10.32" -http = "0.2.3" +openssl = "0.10.35" +http = "0.2.4" http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] } -http-signature-normalization-reqwest = { version = "0.1.3", default-features = false, features = ["sha-2"] } +http-signature-normalization-reqwest = { version = "0.2.0", default-features = false, features = ["sha-2"] } base64 = "0.13.0" -tokio = "0.3.6" -futures = "0.3.12" -itertools = "0.10.0" +tokio = "1.7.1" +futures = "0.3.15" +itertools = "0.10.1" uuid = { version = "0.8.2", features = ["serde", "v4"] } -sha2 = "0.9.3" -async-trait = "0.1.42" -anyhow = "1.0.38" -thiserror = "1.0.23" -background-jobs = "0.8.0" -reqwest = { version = "0.10.10", features = ["json"] } -backtrace = "0.3.56" +sha2 = "0.9.5" +async-trait = "0.1.50" +anyhow = "1.0.41" +thiserror = "1.0.25" +background-jobs = "0.9.0" +reqwest = { version = "0.11.4", features = ["json"] } +backtrace = "0.3.60" diff --git a/crates/apub/src/activities/send/comment.rs b/crates/apub/src/activities/send/comment.rs index b27255755..b93f9e1c9 100644 --- a/crates/apub/src/activities/send/comment.rs +++ b/crates/apub/src/activities/send/comment.rs @@ -57,7 +57,7 @@ impl ApubObjectType for Comment { }) .await??; - let maa = collect_non_local_mentions(&self, &community, context).await?; + let maa = collect_non_local_mentions(self, &community, context).await?; let mut create = Create::new( creator.actor_id.to_owned().into_inner(), @@ -71,8 +71,8 @@ impl ApubObjectType for Comment { // Set the mention tags .set_many_tags(maa.get_tags()?); - send_to_community(create.clone(), &creator, &community, None, context).await?; - send_comment_mentions(&creator, maa.inboxes, create, context).await?; + send_to_community(create.clone(), creator, &community, None, context).await?; + send_comment_mentions(creator, maa.inboxes, create, context).await?; Ok(()) } @@ -90,7 +90,7 @@ impl ApubObjectType for Comment { }) .await??; - let maa = collect_non_local_mentions(&self, &community, context).await?; + let maa = collect_non_local_mentions(self, &community, context).await?; let mut update = Update::new( creator.actor_id.to_owned().into_inner(), @@ -104,8 +104,8 @@ impl ApubObjectType for Comment { // Set the mention tags .set_many_tags(maa.get_tags()?); - send_to_community(update.clone(), &creator, &community, None, context).await?; - send_comment_mentions(&creator, maa.inboxes, update, context).await?; + send_to_community(update.clone(), creator, &community, None, context).await?; + send_comment_mentions(creator, maa.inboxes, update, context).await?; Ok(()) } @@ -129,7 +129,7 @@ impl ApubObjectType for Comment { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(delete, &creator, &community, None, context).await?; + send_to_community(delete, creator, &community, None, context).await?; Ok(()) } @@ -169,7 +169,7 @@ impl ApubObjectType for Comment { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(undo, &creator, &community, None, context).await?; + send_to_community(undo, creator, &community, None, context).await?; Ok(()) } @@ -193,7 +193,7 @@ impl ApubObjectType for Comment { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(remove, &mod_, &community, None, context).await?; + send_to_community(remove, mod_, &community, None, context).await?; Ok(()) } @@ -233,7 +233,7 @@ impl ApubObjectType for Comment { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(undo, &mod_, &community, None, context).await?; + send_to_community(undo, mod_, &community, None, context).await?; Ok(()) } } @@ -260,7 +260,7 @@ impl ApubLikeableType for Comment { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(like, &creator, &community, None, context).await?; + send_to_community(like, creator, &community, None, context).await?; Ok(()) } @@ -284,7 +284,7 @@ impl ApubLikeableType for Comment { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(dislike, &creator, &community, None, context).await?; + send_to_community(dislike, creator, &community, None, context).await?; Ok(()) } @@ -323,7 +323,7 @@ impl ApubLikeableType for Comment { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(undo, &creator, &community, None, context).await?; + send_to_community(undo, creator, &community, None, context).await?; Ok(()) } } diff --git a/crates/apub/src/activities/send/community.rs b/crates/apub/src/activities/send/community.rs index c5112f58c..378c5bd60 100644 --- a/crates/apub/src/activities/send/community.rs +++ b/crates/apub/src/activities/send/community.rs @@ -328,7 +328,7 @@ impl CommunityType for Community { .set_many_ccs(vec![self.actor_id()]) .set_target(generate_moderators_url(&self.actor_id)?.into_inner()); - send_to_community(remove, &actor, self, Some(removed_mod.actor_id()), context).await?; + send_to_community(remove, actor, self, Some(removed_mod.actor_id()), context).await?; Ok(()) } @@ -345,7 +345,7 @@ impl CommunityType for Community { .set_to(public()) .set_many_ccs(vec![self.actor_id()]); - send_to_community(block, &actor, self, Some(blocked_user.actor_id()), context).await?; + send_to_community(block, actor, self, Some(blocked_user.actor_id()), context).await?; Ok(()) } @@ -370,7 +370,7 @@ impl CommunityType for Community { .set_to(public()) .set_many_ccs(vec![self.actor_id()]); - send_to_community(undo, &actor, self, Some(unblocked_user.actor_id()), context).await?; + send_to_community(undo, actor, self, Some(unblocked_user.actor_id()), context).await?; Ok(()) } } diff --git a/crates/apub/src/activities/send/person.rs b/crates/apub/src/activities/send/person.rs index 286778c78..1e72a8578 100644 --- a/crates/apub/src/activities/send/person.rs +++ b/crates/apub/src/activities/send/person.rs @@ -69,7 +69,7 @@ impl UserType for Person { person_id: self.id, pending: true, }; - blocking(&context.pool(), move |conn| { + blocking(context.pool(), move |conn| { CommunityFollower::follow(conn, &community_follower_form).ok() }) .await?; diff --git a/crates/apub/src/activities/send/post.rs b/crates/apub/src/activities/send/post.rs index 0af7369ac..c51d6f2d6 100644 --- a/crates/apub/src/activities/send/post.rs +++ b/crates/apub/src/activities/send/post.rs @@ -211,7 +211,7 @@ impl ApubLikeableType for Post { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(like, &creator, &community, None, context).await?; + send_to_community(like, creator, &community, None, context).await?; Ok(()) } @@ -232,7 +232,7 @@ impl ApubLikeableType for Post { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(dislike, &creator, &community, None, context).await?; + send_to_community(dislike, creator, &community, None, context).await?; Ok(()) } @@ -268,7 +268,7 @@ impl ApubLikeableType for Post { .set_to(public()) .set_many_ccs(vec![community.actor_id()]); - send_to_community(undo, &creator, &community, None, context).await?; + send_to_community(undo, creator, &community, None, context).await?; Ok(()) } } diff --git a/crates/apub/src/extensions/signatures.rs b/crates/apub/src/extensions/signatures.rs index 92e2a306d..47b8e5a2b 100644 --- a/crates/apub/src/extensions/signatures.rs +++ b/crates/apub/src/extensions/signatures.rs @@ -80,7 +80,7 @@ pub fn verify_signature(request: &HttpRequest, actor: &dyn ActorType) -> Result< ); let public_key = PKey::public_key_from_pem(public_key.as_bytes())?; let mut verifier = Verifier::new(MessageDigest::sha256(), &public_key)?; - verifier.update(&signing_string.as_bytes())?; + verifier.update(signing_string.as_bytes())?; Ok(verifier.verify(&base64::decode(signature)?)?) })?; diff --git a/crates/apub/src/fetcher/community.rs b/crates/apub/src/fetcher/community.rs index 6187ac10c..f0a759c54 100644 --- a/crates/apub/src/fetcher/community.rs +++ b/crates/apub/src/fetcher/community.rs @@ -16,10 +16,7 @@ use anyhow::Context; use diesel::result::Error::NotFound; use lemmy_api_common::blocking; use lemmy_db_queries::{source::community::Community_, ApubObject, Joinable}; -use lemmy_db_schema::{ - source::community::{Community, CommunityModerator, CommunityModeratorForm}, - DbUrl, -}; +use lemmy_db_schema::source::community::{Community, CommunityModerator, CommunityModeratorForm}; use lemmy_db_views_actor::community_moderator_view::CommunityModeratorView; use lemmy_utils::{location_info, LemmyError}; use lemmy_websocket::LemmyContext; @@ -102,12 +99,12 @@ async fn update_community_mods( let new_moderators = fetch_community_mods(context, group, request_counter).await?; let community_id = community.id; let current_moderators = blocking(context.pool(), move |conn| { - CommunityModeratorView::for_community(&conn, community_id) + CommunityModeratorView::for_community(conn, community_id) }) .await??; // Remove old mods from database which arent in the moderators collection anymore for mod_user in ¤t_moderators { - if !new_moderators.contains(&&mod_user.moderator.actor_id.clone().into()) { + if !new_moderators.contains(&mod_user.moderator.actor_id.clone().into()) { let community_moderator_form = CommunityModeratorForm { community_id: mod_user.community.id, person_id: mod_user.moderator.id, @@ -122,12 +119,13 @@ async fn update_community_mods( // Add new mods to database which have been added to moderators collection for mod_uri in new_moderators { let mod_user = get_or_fetch_and_upsert_person(&mod_uri, context, request_counter).await?; - let current_mod_uris: Vec = current_moderators + + if !current_moderators .clone() .iter() .map(|c| c.moderator.actor_id.clone()) - .collect(); - if !current_mod_uris.contains(&mod_user.actor_id) { + .any(|x| x == mod_user.actor_id) + { let community_moderator_form = CommunityModeratorForm { community_id: community.id, person_id: mod_user.id, diff --git a/crates/apub/src/fetcher/fetch.rs b/crates/apub/src/fetcher/fetch.rs index 03f9e3fb2..128ccf1f7 100644 --- a/crates/apub/src/fetcher/fetch.rs +++ b/crates/apub/src/fetcher/fetch.rs @@ -60,7 +60,7 @@ where if *recursion_counter > MAX_REQUEST_NUMBER { return Err(LemmyError::from(anyhow!("Maximum recursion depth reached")).into()); } - check_is_apub_id_valid(&url, false)?; + check_is_apub_id_valid(url, false)?; let timeout = Duration::from_secs(60); diff --git a/crates/apub/src/fetcher/search.rs b/crates/apub/src/fetcher/search.rs index d2d00f324..5a09fd430 100644 --- a/crates/apub/src/fetcher/search.rs +++ b/crates/apub/src/fetcher/search.rs @@ -89,7 +89,7 @@ pub async fn search_by_apub_id( ); Url::parse(&url)? } else { - Url::parse(&query)? + Url::parse(query)? }; let recursion_counter = &mut 0; @@ -124,7 +124,7 @@ async fn build_response( SearchAcceptedObjects::Person(p) => { let person_uri = p.inner.id(domain)?.context("person has no id")?; - let person = get_or_fetch_and_upsert_person(&person_uri, context, recursion_counter).await?; + let person = get_or_fetch_and_upsert_person(person_uri, context, recursion_counter).await?; response.users = vec![ blocking(context.pool(), move |conn| { diff --git a/crates/apub/src/objects/comment.rs b/crates/apub/src/objects/comment.rs index ae16b76fe..361da4629 100644 --- a/crates/apub/src/objects/comment.rs +++ b/crates/apub/src/objects/comment.rs @@ -169,7 +169,7 @@ impl FromApubToForm for CommentForm { // This post, or the parent comment might not yet exist on this server yet, fetch them. let post = Box::pin(get_or_fetch_and_insert_post( - &post_ap_id, + post_ap_id, context, request_counter, )) @@ -181,7 +181,7 @@ impl FromApubToForm for CommentForm { Some(parent_comment_uri) => { let parent_comment_ap_id = &parent_comment_uri?; let parent_comment = Box::pin(get_or_fetch_and_insert_comment( - &parent_comment_ap_id, + parent_comment_ap_id, context, request_counter, )) diff --git a/crates/apub/src/objects/community.rs b/crates/apub/src/objects/community.rs index a72575d07..34a15793b 100644 --- a/crates/apub/src/objects/community.rs +++ b/crates/apub/src/objects/community.rs @@ -45,7 +45,7 @@ impl ToApub for Community { async fn to_apub(&self, pool: &DbPool) -> Result { let id = self.id; let moderators = blocking(pool, move |conn| { - CommunityModeratorView::for_community(&conn, id) + CommunityModeratorView::for_community(conn, id) }) .await??; let moderators: Vec = moderators diff --git a/crates/apub/src/objects/mod.rs b/crates/apub/src/objects/mod.rs index 351ece1fc..c87fc043c 100644 --- a/crates/apub/src/objects/mod.rs +++ b/crates/apub/src/objects/mod.rs @@ -199,7 +199,7 @@ where // otherwise parse and insert, assuring that it comes from the right domain else { let to_form = ToForm::from_apub( - &from, + from, context, expected_domain, request_counter, diff --git a/crates/apub/src/objects/post.rs b/crates/apub/src/objects/post.rs index 1c984d84d..19bfe8aab 100644 --- a/crates/apub/src/objects/post.rs +++ b/crates/apub/src/objects/post.rs @@ -71,7 +71,7 @@ impl ToApub for Post { .set_attributed_to(creator.actor_id.into_inner()); if let Some(body) = &self.body { - set_content_and_source(&mut page, &body)?; + set_content_and_source(&mut page, body)?; } if let Some(url) = &self.url { diff --git a/crates/apub_receive/Cargo.toml b/crates/apub_receive/Cargo.toml index 54e01f7df..fdf63747b 100644 --- a/crates/apub_receive/Cargo.toml +++ b/crates/apub_receive/Cargo.toml @@ -12,34 +12,34 @@ lemmy_db_views = { path = "../db_views" } lemmy_db_views_actor = { path = "../db_views_actor" } lemmy_api_common = { path = "../api_common" } lemmy_websocket = { path = "../websocket" } -diesel = "1.4.5" +diesel = "1.4.7" activitystreams = "0.7.0-alpha.11" activitystreams-ext = "0.1.0-alpha.2" -bcrypt = "0.9.0" +bcrypt = "0.10.0" chrono = { version = "0.4.19", features = ["serde"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } -serde = { version = "1.0.123", features = ["derive"] } -actix = "0.10.0" +serde_json = { version = "1.0.64", features = ["preserve_order"] } +serde = { version = "1.0.126", features = ["derive"] } +actix = "0.12.0" actix-web = { version = "3.3.2", default-features = false } -actix-rt = { version = "1.1.1", default-features = false } +actix-rt = { version = "2.2.0", default-features = false } awc = { version = "2.0.3", default-features = false } log = "0.4.14" -rand = "0.8.3" -strum = "0.20.0" -strum_macros = "0.20.1" -url = { version = "2.2.1", features = ["serde"] } +rand = "0.8.4" +strum = "0.21.0" +strum_macros = "0.21.1" +url = { version = "2.2.2", features = ["serde"] } percent-encoding = "2.1.0" -openssl = "0.10.32" -http = "0.2.3" +openssl = "0.10.35" +http = "0.2.4" http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] } -http-signature-normalization-reqwest = { version = "0.1.3", default-features = false, features = ["sha-2"] } +http-signature-normalization-reqwest = { version = "0.2.0", default-features = false, features = ["sha-2"] } base64 = "0.13.0" -tokio = "0.3.6" -futures = "0.3.12" -itertools = "0.10.0" -sha2 = "0.9.3" -async-trait = "0.1.42" -anyhow = "1.0.38" -thiserror = "1.0.23" -backtrace = "0.3.56" +tokio = "1.7.1" +futures = "0.3.15" +itertools = "0.10.1" +sha2 = "0.9.5" +async-trait = "0.1.50" +anyhow = "1.0.41" +thiserror = "1.0.25" +backtrace = "0.3.60" diff --git a/crates/apub_receive/src/activities/receive/mod.rs b/crates/apub_receive/src/activities/receive/mod.rs index afad2dfc9..f421a45e9 100644 --- a/crates/apub_receive/src/activities/receive/mod.rs +++ b/crates/apub_receive/src/activities/receive/mod.rs @@ -39,7 +39,7 @@ where { let actor = activity.actor()?; let person_uri = actor.as_single_xsd_any_uri().context(location_info!())?; - get_or_fetch_and_upsert_person(&person_uri, context, request_counter).await + get_or_fetch_and_upsert_person(person_uri, context, request_counter).await } /// Ensure that the ID of an incoming activity comes from the same domain as the actor. Optionally diff --git a/crates/apub_receive/src/activities/receive/private_message.rs b/crates/apub_receive/src/activities/receive/private_message.rs index a0dcb81ea..3d82c5c2b 100644 --- a/crates/apub_receive/src/activities/receive/private_message.rs +++ b/crates/apub_receive/src/activities/receive/private_message.rs @@ -41,7 +41,7 @@ pub(crate) async fn receive_create_private_message( let private_message = PrivateMessage::from_apub(¬e, context, expected_domain, request_counter, false).await?; - let message = blocking(&context.pool(), move |conn| { + let message = blocking(context.pool(), move |conn| { PrivateMessageView::read(conn, private_message.id) }) .await??; @@ -88,7 +88,7 @@ pub(crate) async fn receive_update_private_message( PrivateMessage::from_apub(¬e, context, expected_domain, request_counter, false).await?; let private_message_id = private_message.id; - let message = blocking(&context.pool(), move |conn| { + let message = blocking(context.pool(), move |conn| { PrivateMessageView::read(conn, private_message_id) }) .await??; @@ -128,8 +128,8 @@ pub(crate) async fn receive_delete_private_message( }) .await??; - let message = blocking(&context.pool(), move |conn| { - PrivateMessageView::read(&conn, deleted_private_message.id) + let message = blocking(context.pool(), move |conn| { + PrivateMessageView::read(conn, deleted_private_message.id) }) .await??; @@ -173,8 +173,8 @@ pub(crate) async fn receive_undo_delete_private_message( }) .await??; - let message = blocking(&context.pool(), move |conn| { - PrivateMessageView::read(&conn, deleted_private_message.id) + let message = blocking(context.pool(), move |conn| { + PrivateMessageView::read(conn, deleted_private_message.id) }) .await??; @@ -222,7 +222,7 @@ where .context(location_info!())?; check_is_apub_id_valid(&person_id, false)?; // check that the sender is a person, not a community - get_or_fetch_and_upsert_person(&person_id, &context, request_counter).await?; + get_or_fetch_and_upsert_person(&person_id, context, request_counter).await?; Ok(()) } diff --git a/crates/apub_receive/src/http/community.rs b/crates/apub_receive/src/http/community.rs index 1d5ae906e..30daa3b18 100644 --- a/crates/apub_receive/src/http/community.rs +++ b/crates/apub_receive/src/http/community.rs @@ -52,13 +52,13 @@ pub(crate) async fn get_apub_community_followers( context: web::Data, ) -> Result, LemmyError> { let community = blocking(context.pool(), move |conn| { - Community::read_from_name(&conn, &info.community_name) + Community::read_from_name(conn, &info.community_name) }) .await??; let community_id = community.id; let community_followers = blocking(context.pool(), move |conn| { - CommunityFollowerView::for_community(&conn, community_id) + CommunityFollowerView::for_community(conn, community_id) }) .await??; @@ -77,7 +77,7 @@ pub(crate) async fn get_apub_community_outbox( context: web::Data, ) -> Result, LemmyError> { let community = blocking(context.pool(), move |conn| { - Community::read_from_name(&conn, &info.community_name) + Community::read_from_name(conn, &info.community_name) }) .await??; @@ -106,7 +106,7 @@ pub(crate) async fn get_apub_community_inbox( context: web::Data, ) -> Result, LemmyError> { let community = blocking(context.pool(), move |conn| { - Community::read_from_name(&conn, &info.community_name) + Community::read_from_name(conn, &info.community_name) }) .await??; @@ -122,7 +122,7 @@ pub(crate) async fn get_apub_community_moderators( context: web::Data, ) -> Result, LemmyError> { let community = blocking(context.pool(), move |conn| { - Community::read_from_name(&conn, &info.community_name) + Community::read_from_name(conn, &info.community_name) }) .await??; @@ -132,7 +132,7 @@ pub(crate) async fn get_apub_community_moderators( // ignore that for now let cid = community.id; let moderators = blocking(context.pool(), move |conn| { - CommunityModeratorView::for_community(&conn, cid) + CommunityModeratorView::for_community(conn, cid) }) .await??; diff --git a/crates/apub_receive/src/http/mod.rs b/crates/apub_receive/src/http/mod.rs index 531c37890..4f3328497 100644 --- a/crates/apub_receive/src/http/mod.rs +++ b/crates/apub_receive/src/http/mod.rs @@ -55,7 +55,7 @@ pub(crate) async fn get_activity( ))? .into(); let activity = blocking(context.pool(), move |conn| { - Activity::read_from_apub_id(&conn, &activity_id) + Activity::read_from_apub_id(conn, &activity_id) }) .await??; diff --git a/crates/apub_receive/src/http/person.rs b/crates/apub_receive/src/http/person.rs index 69598ec2a..0d0b8f765 100644 --- a/crates/apub_receive/src/http/person.rs +++ b/crates/apub_receive/src/http/person.rs @@ -44,7 +44,7 @@ pub(crate) async fn get_apub_person_outbox( context: web::Data, ) -> Result, LemmyError> { let person = blocking(context.pool(), move |conn| { - Person::find_by_name(&conn, &info.user_name) + Person::find_by_name(conn, &info.user_name) }) .await??; // TODO: populate the person outbox @@ -62,7 +62,7 @@ pub(crate) async fn get_apub_person_inbox( context: web::Data, ) -> Result, LemmyError> { let person = blocking(context.pool(), move |conn| { - Person::find_by_name(&conn, &info.user_name) + Person::find_by_name(conn, &info.user_name) }) .await??; diff --git a/crates/apub_receive/src/inbox/community_inbox.rs b/crates/apub_receive/src/inbox/community_inbox.rs index dfea86055..d851b7c0e 100644 --- a/crates/apub_receive/src/inbox/community_inbox.rs +++ b/crates/apub_receive/src/inbox/community_inbox.rs @@ -84,12 +84,12 @@ pub async fn community_inbox( // Check if the activity is actually meant for us let path = path.into_inner(); - let community = blocking(&context.pool(), move |conn| { - Community::read_from_name(&conn, &path) + let community = blocking(context.pool(), move |conn| { + Community::read_from_name(conn, &path) }) .await??; let to_and_cc = get_activity_to_and_cc(&activity); - if !to_and_cc.contains(&&community.actor_id()) { + if !to_and_cc.contains(&community.actor_id()) { return Err(anyhow!("Activity delivered to wrong community").into()); } @@ -117,8 +117,8 @@ pub(crate) async fn community_receive_message( // Only persons can send activities to the community, so we can get the actor as person // unconditionally. let actor_id = actor.actor_id(); - let person = blocking(&context.pool(), move |conn| { - Person::read_from_apub_id(&conn, &actor_id.into()) + let person = blocking(context.pool(), move |conn| { + Person::read_from_apub_id(conn, &actor_id.into()) }) .await??; check_community_or_site_ban(&person, to_community.id, context.pool()).await?; @@ -142,7 +142,7 @@ pub(crate) async fn community_receive_message( any_base.clone(), person, &to_community, - &context, + context, )) .await?; false @@ -282,8 +282,8 @@ async fn handle_follow( }; // This will fail if they're already a follower, but ignore the error. - blocking(&context.pool(), move |conn| { - CommunityFollower::follow(&conn, &community_follower_form).ok() + blocking(context.pool(), move |conn| { + CommunityFollower::follow(conn, &community_follower_form).ok() }) .await?; @@ -304,7 +304,7 @@ async fn handle_undo( .is_single_kind(&FollowType::Follow.to_string()); let any_base = activity.into_any_base()?; if inner_kind { - handle_undo_follow(any_base, actor_url, to_community, &context).await?; + handle_undo_follow(any_base, actor_url, to_community, context).await?; Ok(false) } else { receive_undo_for_community(context, any_base, None, &actor_url, request_counter).await?; @@ -326,8 +326,8 @@ async fn handle_undo_follow( let follow = Follow::from_any_base(object)?.context(location_info!())?; verify_activity_domains_valid(&follow, &person_url, false)?; - let person = blocking(&context.pool(), move |conn| { - Person::read_from_apub_id(&conn, &person_url.into()) + let person = blocking(context.pool(), move |conn| { + Person::read_from_apub_id(conn, &person_url.into()) }) .await??; let community_follower_form = CommunityFollowerForm { @@ -337,8 +337,8 @@ async fn handle_undo_follow( }; // This will fail if they aren't a follower, but ignore the error. - blocking(&context.pool(), move |conn| { - CommunityFollower::unfollow(&conn, &community_follower_form).ok() + blocking(context.pool(), move |conn| { + CommunityFollower::unfollow(conn, &community_follower_form).ok() }) .await?; diff --git a/crates/apub_receive/src/inbox/mod.rs b/crates/apub_receive/src/inbox/mod.rs index dce2c2794..6b6f7b3fe 100644 --- a/crates/apub_receive/src/inbox/mod.rs +++ b/crates/apub_receive/src/inbox/mod.rs @@ -48,7 +48,7 @@ pub(crate) async fn is_activity_already_known( ) -> Result { let activity_id = activity_id.to_owned().into(); let existing = blocking(pool, move |conn| { - Activity::read_from_apub_id(&conn, &activity_id) + Activity::read_from_apub_id(conn, &activity_id) }) .await?; match existing { @@ -86,7 +86,7 @@ where .single_xsd_any_uri() .context(location_info!())?; check_is_apub_id_valid(&actor_id, false)?; - let actor = get_or_fetch_and_upsert_actor(&actor_id, &context, request_counter).await?; + let actor = get_or_fetch_and_upsert_actor(&actor_id, context, request_counter).await?; verify_signature(&request, actor.as_ref())?; Ok(actor) } @@ -98,8 +98,8 @@ pub(crate) async fn is_addressed_to_local_person( ) -> Result { for url in to_and_cc { let url = url.to_owned(); - let person = blocking(&pool, move |conn| { - Person::read_from_apub_id(&conn, &url.into()) + let person = blocking(pool, move |conn| { + Person::read_from_apub_id(conn, &url.into()) }) .await?; if let Ok(u) = person { @@ -119,9 +119,9 @@ pub(crate) async fn is_addressed_to_community_followers( ) -> Result, LemmyError> { for url in to_and_cc { let url = url.to_owned().into(); - let community = blocking(&pool, move |conn| { + let community = blocking(pool, move |conn| { // ignore errors here, because the current url might not actually be a followers url - Community::read_from_followers_url(&conn, &url).ok() + Community::read_from_followers_url(conn, &url).ok() }) .await?; if let Some(c) = community { diff --git a/crates/apub_receive/src/inbox/person_inbox.rs b/crates/apub_receive/src/inbox/person_inbox.rs index 02d1d8be9..080e143c6 100644 --- a/crates/apub_receive/src/inbox/person_inbox.rs +++ b/crates/apub_receive/src/inbox/person_inbox.rs @@ -102,13 +102,13 @@ pub async fn person_inbox( // Check if the activity is actually meant for us let username = path.into_inner(); - let person = blocking(&context.pool(), move |conn| { - Person::find_by_name(&conn, &username) + let person = blocking(context.pool(), move |conn| { + Person::find_by_name(conn, &username) }) .await??; let to_and_cc = get_activity_to_and_cc(&activity); // TODO: we should also accept activities that are sent to community followers - if !to_and_cc.contains(&&person.actor_id()) { + if !to_and_cc.contains(&person.actor_id()) { return Err(anyhow!("Activity delivered to wrong person").into()); } @@ -150,7 +150,7 @@ pub(crate) async fn person_receive_message( match kind { PersonValidTypes::Accept => { receive_accept( - &context, + context, any_base, actor, to_person.expect("person provided"), @@ -159,11 +159,11 @@ pub(crate) async fn person_receive_message( .await?; } PersonValidTypes::Announce => { - Box::pin(receive_announce(&context, any_base, actor, request_counter)).await? + Box::pin(receive_announce(context, any_base, actor, request_counter)).await? } PersonValidTypes::Create => { Box::pin(receive_create( - &context, + context, any_base, actor_url, request_counter, @@ -172,7 +172,7 @@ pub(crate) async fn person_receive_message( } PersonValidTypes::Update => { Box::pin(receive_update( - &context, + context, any_base, actor_url, request_counter, @@ -217,7 +217,7 @@ async fn is_for_person_inbox( let community = is_addressed_to_community_followers(&to_and_cc, context.pool()).await?; if let Some(c) = community { let community_id = c.id; - let has_local_followers = blocking(&context.pool(), move |conn| { + let has_local_followers = blocking(context.pool(), move |conn| { CommunityFollower::has_local_followers(conn, community_id) }) .await??; @@ -261,7 +261,7 @@ async fn receive_accept( let community_id = community.id; let person_id = person.id; // This will throw an error if no follow was requested - blocking(&context.pool(), move |conn| { + blocking(context.pool(), move |conn| { CommunityFollower::follow_accepted(conn, community_id, person_id) }) .await??; @@ -377,7 +377,7 @@ async fn receive_create( if verify_is_addressed_to_public(&create).is_ok() { receive_create_comment(create, context, request_counter).await } else { - receive_create_private_message(&context, create, expected_domain, request_counter).await + receive_create_private_message(context, create, expected_domain, request_counter).await } } @@ -394,7 +394,7 @@ async fn receive_update( if verify_is_addressed_to_public(&update).is_ok() { receive_update_comment(update, context, request_counter).await } else { - receive_update_private_message(&context, update, expected_domain, request_counter).await + receive_update_private_message(context, update, expected_domain, request_counter).await } } @@ -436,7 +436,7 @@ async fn receive_remove( Community::read_from_apub_id(conn, &object_uri.into()) }) .await??; - receive_remove_community(&context, community).await + receive_remove_community(context, community).await } async fn receive_undo( diff --git a/crates/apub_receive/src/inbox/receive_for_community.rs b/crates/apub_receive/src/inbox/receive_for_community.rs index 970f80ddd..4bb8d3250 100644 --- a/crates/apub_receive/src/inbox/receive_for_community.rs +++ b/crates/apub_receive/src/inbox/receive_for_community.rs @@ -128,7 +128,7 @@ pub(in crate::inbox) async fn receive_create_for_community( request_counter: &mut i32, ) -> Result<(), LemmyError> { let create = Create::from_any_base(activity)?.context(location_info!())?; - verify_activity_domains_valid(&create, &expected_domain, true)?; + verify_activity_domains_valid(&create, expected_domain, true)?; verify_is_addressed_to_public(&create)?; let kind = create @@ -151,7 +151,7 @@ pub(in crate::inbox) async fn receive_update_for_community( request_counter: &mut i32, ) -> Result<(), LemmyError> { let update = Update::from_any_base(activity.to_owned())?.context(location_info!())?; - verify_activity_domains_valid(&update, &expected_domain, false)?; + verify_activity_domains_valid(&update, expected_domain, false)?; verify_is_addressed_to_public(&update)?; verify_modification_actor_instance(&update, &announce, context, request_counter).await?; @@ -179,14 +179,14 @@ pub(in crate::inbox) async fn receive_like_for_community( request_counter: &mut i32, ) -> Result<(), LemmyError> { let like = Like::from_any_base(activity)?.context(location_info!())?; - verify_activity_domains_valid(&like, &expected_domain, false)?; + verify_activity_domains_valid(&like, expected_domain, false)?; verify_is_addressed_to_public(&like)?; let object_id = like .object() .as_single_xsd_any_uri() .context(location_info!())?; - match fetch_post_or_comment_by_id(&object_id, context, request_counter).await? { + match fetch_post_or_comment_by_id(object_id, context, request_counter).await? { PostOrComment::Post(post) => receive_like_post(like, *post, context, request_counter).await, PostOrComment::Comment(comment) => { receive_like_comment(like, *comment, context, request_counter).await @@ -210,14 +210,14 @@ pub(in crate::inbox) async fn receive_dislike_for_community( } let dislike = Dislike::from_any_base(activity)?.context(location_info!())?; - verify_activity_domains_valid(&dislike, &expected_domain, false)?; + verify_activity_domains_valid(&dislike, expected_domain, false)?; verify_is_addressed_to_public(&dislike)?; let object_id = dislike .object() .as_single_xsd_any_uri() .context(location_info!())?; - match fetch_post_or_comment_by_id(&object_id, context, request_counter).await? { + match fetch_post_or_comment_by_id(object_id, context, request_counter).await? { PostOrComment::Post(post) => { receive_dislike_post(dislike, *post, context, request_counter).await } @@ -248,11 +248,11 @@ pub(in crate::inbox) async fn receive_delete_for_community( match find_object_by_id(context, object).await { Ok(Object::Post(p)) => { - verify_activity_domains_valid(&delete, &expected_domain, true)?; + verify_activity_domains_valid(&delete, expected_domain, true)?; receive_delete_post(context, *p).await } Ok(Object::Comment(c)) => { - verify_activity_domains_valid(&delete, &expected_domain, true)?; + verify_activity_domains_valid(&delete, expected_domain, true)?; receive_delete_comment(context, *c).await } Ok(Object::Community(c)) => { @@ -281,7 +281,7 @@ pub(in crate::inbox) async fn receive_remove_for_community( .object() .as_single_xsd_any_uri() .context(location_info!())?; - let remove_mod = get_or_fetch_and_upsert_person(&remove_mod, context, request_counter).await?; + let remove_mod = get_or_fetch_and_upsert_person(remove_mod, context, request_counter).await?; let form = CommunityModeratorForm { community_id: community.id, person_id: remove_mod.id, @@ -388,11 +388,11 @@ pub(in crate::inbox) async fn receive_undo_delete_for_community( .context(location_info!())?; match find_object_by_id(context, object).await { Ok(Object::Post(p)) => { - verify_activity_domains_valid(&delete, &expected_domain, true)?; + verify_activity_domains_valid(&delete, expected_domain, true)?; receive_undo_delete_post(context, *p).await } Ok(Object::Comment(c)) => { - verify_activity_domains_valid(&delete, &expected_domain, true)?; + verify_activity_domains_valid(&delete, expected_domain, true)?; receive_undo_delete_comment(context, *c).await } Ok(Object::Community(c)) => { @@ -413,7 +413,7 @@ pub(in crate::inbox) async fn receive_undo_remove_for_community( ) -> Result<(), LemmyError> { let remove = Remove::from_any_base(undo.object().to_owned().one().context(location_info!())?)? .context(location_info!())?; - verify_activity_domains_valid(&remove, &expected_domain, false)?; + verify_activity_domains_valid(&remove, expected_domain, false)?; verify_is_addressed_to_public(&remove)?; verify_undo_remove_actor_instance(&undo, &remove, &announce, context).await?; @@ -439,14 +439,14 @@ pub(in crate::inbox) async fn receive_undo_like_for_community( ) -> Result<(), LemmyError> { let like = Like::from_any_base(undo.object().to_owned().one().context(location_info!())?)? .context(location_info!())?; - verify_activity_domains_valid(&like, &expected_domain, false)?; + verify_activity_domains_valid(&like, expected_domain, false)?; verify_is_addressed_to_public(&like)?; let object_id = like .object() .as_single_xsd_any_uri() .context(location_info!())?; - match fetch_post_or_comment_by_id(&object_id, context, request_counter).await? { + match fetch_post_or_comment_by_id(object_id, context, request_counter).await? { PostOrComment::Post(post) => { receive_undo_like_post(&like, *post, context, request_counter).await } @@ -474,7 +474,7 @@ pub(in crate::inbox) async fn receive_add_for_community( .object() .as_single_xsd_any_uri() .context(location_info!())?; - let new_mod = get_or_fetch_and_upsert_person(&new_mod, context, request_counter).await?; + let new_mod = get_or_fetch_and_upsert_person(new_mod, context, request_counter).await?; // If we had to refetch the community while parsing the activity, then the new mod has already // been added. Skip it here as it would result in a duplicate key error. @@ -515,14 +515,14 @@ pub(in crate::inbox) async fn receive_undo_dislike_for_community( ) -> Result<(), LemmyError> { let dislike = Dislike::from_any_base(undo.object().to_owned().one().context(location_info!())?)? .context(location_info!())?; - verify_activity_domains_valid(&dislike, &expected_domain, false)?; + verify_activity_domains_valid(&dislike, expected_domain, false)?; verify_is_addressed_to_public(&dislike)?; let object_id = dislike .object() .as_single_xsd_any_uri() .context(location_info!())?; - match fetch_post_or_comment_by_id(&object_id, context, request_counter).await? { + match fetch_post_or_comment_by_id(object_id, context, request_counter).await? { PostOrComment::Post(post) => { receive_undo_dislike_post(&dislike, *post, context, request_counter).await } @@ -548,8 +548,7 @@ pub(crate) async fn receive_block_user_for_community( .object() .as_single_xsd_any_uri() .context(location_info!())?; - let blocked_user = - get_or_fetch_and_upsert_person(&blocked_user, context, request_counter).await?; + let blocked_user = get_or_fetch_and_upsert_person(blocked_user, context, request_counter).await?; let community_user_ban_form = CommunityPersonBanForm { community_id: community.id, @@ -587,7 +586,7 @@ pub(crate) async fn receive_undo_block_user_for_community( let block = Block::from_any_base(object)?.context(location_info!())?; let community = extract_community_from_cc(&block, context).await?; - verify_activity_domains_valid(&block, &expected_domain, false)?; + verify_activity_domains_valid(&block, expected_domain, false)?; verify_is_addressed_to_public(&block)?; verify_undo_remove_actor_instance(&undo, &block, &announce, context).await?; @@ -595,8 +594,7 @@ pub(crate) async fn receive_undo_block_user_for_community( .object() .as_single_xsd_any_uri() .context(location_info!())?; - let blocked_user = - get_or_fetch_and_upsert_person(&blocked_user, context, request_counter).await?; + let blocked_user = get_or_fetch_and_upsert_person(blocked_user, context, request_counter).await?; let community_user_ban_form = CommunityPersonBanForm { community_id: community.id, @@ -646,8 +644,8 @@ where .flatten() .context(location_info!())?; let community_id: DbUrl = community_id.to_owned().into(); - let community = blocking(&context.pool(), move |conn| { - Community::read_from_apub_id(&conn, &community_id) + let community = blocking(context.pool(), move |conn| { + Community::read_from_apub_id(conn, &community_id) }) .await??; Ok(community) @@ -672,8 +670,8 @@ where .as_single_xsd_any_uri() .context(location_info!())? .to_owned(); - let actor = blocking(&context.pool(), move |conn| { - Person::read_from_apub_id(&conn, &actor.into()) + let actor = blocking(context.pool(), move |conn| { + Person::read_from_apub_id(conn, &actor.into()) }) .await??; diff --git a/crates/apub_receive/src/inbox/shared_inbox.rs b/crates/apub_receive/src/inbox/shared_inbox.rs index db060247c..17691d4f4 100644 --- a/crates/apub_receive/src/inbox/shared_inbox.rs +++ b/crates/apub_receive/src/inbox/shared_inbox.rs @@ -137,8 +137,8 @@ async fn extract_local_community_from_destinations( ) -> Result, LemmyError> { for url in to_and_cc { let url = url.to_owned(); - let community = blocking(&pool, move |conn| { - Community::read_from_apub_id(&conn, &url.into()) + let community = blocking(pool, move |conn| { + Community::read_from_apub_id(conn, &url.into()) }) .await?; if let Ok(c) = community { diff --git a/crates/db_queries/Cargo.toml b/crates/db_queries/Cargo.toml index c950eea95..1fa57ef84 100644 --- a/crates/db_queries/Cargo.toml +++ b/crates/db_queries/Cargo.toml @@ -11,19 +11,19 @@ doctest = false [dependencies] lemmy_utils = { path = "../utils" } lemmy_db_schema = { path = "../db_schema" } -diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","serde_json"] } +diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } diesel_migrations = "1.4.0" chrono = { version = "0.4.19", features = ["serde"] } -serde = { version = "1.0.123", features = ["derive"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } -strum = "0.20.0" -strum_macros = "0.20.1" +serde = { version = "1.0.126", features = ["derive"] } +serde_json = { version = "1.0.64", features = ["preserve_order"] } +strum = "0.21.0" +strum_macros = "0.21.1" log = "0.4.14" -sha2 = "0.9.3" -url = { version = "2.2.1", features = ["serde"] } +sha2 = "0.9.5" +url = { version = "2.2.2", features = ["serde"] } lazy_static = "1.4.0" -regex = "1.4.3" -bcrypt = "0.9.0" +regex = "1.5.4" +bcrypt = "0.10.0" [dev-dependencies] -serial_test = "0.5.1" \ No newline at end of file +serial_test = "0.5.1" diff --git a/crates/db_queries/src/lib.rs b/crates/db_queries/src/lib.rs index 0665ac95d..fbd508c15 100644 --- a/crates/db_queries/src/lib.rs +++ b/crates/db_queries/src/lib.rs @@ -314,7 +314,7 @@ mod tests { let example_url = "https://example.com"; assert!(matches!( diesel_option_overwrite_to_url(&Some(example_url.to_string())), - Ok(Some(Some(url))) if url == Url::parse(&example_url).unwrap().into() + Ok(Some(Some(url))) if url == Url::parse(example_url).unwrap().into() )); } } diff --git a/crates/db_queries/src/source/activity.rs b/crates/db_queries/src/source/activity.rs index d1fc0622f..f87cf7330 100644 --- a/crates/db_queries/src/source/activity.rs +++ b/crates/db_queries/src/source/activity.rs @@ -78,7 +78,7 @@ impl Activity_ for Activity { sensitive, updated: None, }; - let result = Activity::create(&conn, &activity_form); + let result = Activity::create(conn, &activity_form); match result { Ok(s) => Ok(s), Err(e) => Err(IoError::new( diff --git a/crates/db_queries/src/source/local_user.rs b/crates/db_queries/src/source/local_user.rs index 2cd347e5c..abfc4e0be 100644 --- a/crates/db_queries/src/source/local_user.rs +++ b/crates/db_queries/src/source/local_user.rs @@ -70,7 +70,7 @@ impl LocalUser_ for LocalUser { hash(&form.password_encrypted, DEFAULT_COST).expect("Couldn't hash password"); edited_user.password_encrypted = password_hash; - Self::create(&conn, &edited_user) + Self::create(conn, &edited_user) } fn update_password( diff --git a/crates/db_queries/src/source/password_reset_request.rs b/crates/db_queries/src/source/password_reset_request.rs index 6fe4ee3a5..d04a1ac4b 100644 --- a/crates/db_queries/src/source/password_reset_request.rs +++ b/crates/db_queries/src/source/password_reset_request.rs @@ -53,7 +53,7 @@ impl PasswordResetRequest_ for PasswordResetRequest { token_encrypted: token_hash, }; - Self::create(&conn, &form) + Self::create(conn, &form) } fn read_from_token(conn: &PgConnection, token: &str) -> Result { let mut hasher = Sha256::new(); diff --git a/crates/db_schema/Cargo.toml b/crates/db_schema/Cargo.toml index 70f3364e5..1f4fb7eca 100644 --- a/crates/db_schema/Cargo.toml +++ b/crates/db_schema/Cargo.toml @@ -7,10 +7,10 @@ edition = "2018" doctest = false [dependencies] -diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","serde_json"] } +diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } chrono = { version = "0.4.19", features = ["serde"] } -serde = { version = "1.0.123", features = ["derive"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } +serde = { version = "1.0.126", features = ["derive"] } +serde_json = { version = "1.0.64", features = ["preserve_order"] } log = "0.4.14" -url = { version = "2.2.1", features = ["serde"] } -diesel-derive-newtype = "0.1" +url = { version = "2.2.2", features = ["serde"] } +diesel-derive-newtype = "0.1.2" diff --git a/crates/db_views/Cargo.toml b/crates/db_views/Cargo.toml index 42a942b40..1171684fe 100644 --- a/crates/db_views/Cargo.toml +++ b/crates/db_views/Cargo.toml @@ -9,10 +9,10 @@ doctest = false [dependencies] lemmy_db_queries = { path = "../db_queries" } lemmy_db_schema = { path = "../db_schema" } -diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","serde_json"] } -serde = { version = "1.0.123", features = ["derive"] } +diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } +serde = { version = "1.0.126", features = ["derive"] } log = "0.4.14" -url = "2.2.1" +url = "2.2.2" [dev-dependencies] -serial_test = "0.5.1" \ No newline at end of file +serial_test = "0.5.1" diff --git a/crates/db_views_actor/Cargo.toml b/crates/db_views_actor/Cargo.toml index e237941e1..a38202cf7 100644 --- a/crates/db_views_actor/Cargo.toml +++ b/crates/db_views_actor/Cargo.toml @@ -9,5 +9,5 @@ doctest = false [dependencies] lemmy_db_queries = { path = "../db_queries" } lemmy_db_schema = { path = "../db_schema" } -diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","serde_json"] } -serde = { version = "1.0.123", features = ["derive"] } +diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } +serde = { version = "1.0.126", features = ["derive"] } diff --git a/crates/db_views_moderator/Cargo.toml b/crates/db_views_moderator/Cargo.toml index 9df01522d..5ecd1b1e8 100644 --- a/crates/db_views_moderator/Cargo.toml +++ b/crates/db_views_moderator/Cargo.toml @@ -9,5 +9,5 @@ doctest = false [dependencies] lemmy_db_queries = { path = "../db_queries" } lemmy_db_schema = { path = "../db_schema" } -diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","serde_json"] } -serde = { version = "1.0.123", features = ["derive"] } +diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } +serde = { version = "1.0.126", features = ["derive"] } diff --git a/crates/routes/Cargo.toml b/crates/routes/Cargo.toml index 181d4c501..bb6386f4b 100644 --- a/crates/routes/Cargo.toml +++ b/crates/routes/Cargo.toml @@ -14,17 +14,17 @@ lemmy_db_views = { path = "../db_views" } lemmy_db_views_actor = { path = "../db_views_actor" } lemmy_db_schema = { path = "../db_schema" } lemmy_api_common = { path = "../api_common" } -diesel = "1.4.5" -actix = "0.10.0" +diesel = "1.4.7" +actix = "0.12.0" actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] } actix-web-actors = { version = "3.0.0", default-features = false } -sha2 = "0.9.3" +sha2 = "0.9.5" log = "0.4.14" -anyhow = "1.0.38" +anyhow = "1.0.41" chrono = { version = "0.4.19", features = ["serde"] } rss = "1.10.0" -serde = { version = "1.0.123", features = ["derive"] } +serde = { version = "1.0.126", features = ["derive"] } awc = { version = "2.0.3", default-features = false } -url = { version = "2.2.1", features = ["serde"] } -strum = "0.20.0" +url = { version = "2.2.2", features = ["serde"] } +strum = "0.21.0" lazy_static = "1.4.0" diff --git a/crates/routes/src/feeds.rs b/crates/routes/src/feeds.rs index 06b9ac13a..8250d3c6e 100644 --- a/crates/routes/src/feeds.rs +++ b/crates/routes/src/feeds.rs @@ -88,10 +88,10 @@ async fn get_feed_data( listing_type: ListingType, sort_type: SortType, ) -> Result { - let site_view = blocking(context.pool(), move |conn| SiteView::read(&conn)).await??; + let site_view = blocking(context.pool(), move |conn| SiteView::read(conn)).await??; let posts = blocking(context.pool(), move |conn| { - PostQueryBuilder::create(&conn) + PostQueryBuilder::create(conn) .listing_type(listing_type) .sort(sort_type) .list() @@ -169,10 +169,10 @@ fn get_feed_user( sort_type: &SortType, user_name: String, ) -> Result { - let site_view = SiteView::read(&conn)?; - let person = Person::find_by_name(&conn, &user_name)?; + let site_view = SiteView::read(conn)?; + let person = Person::find_by_name(conn, &user_name)?; - let posts = PostQueryBuilder::create(&conn) + let posts = PostQueryBuilder::create(conn) .listing_type(ListingType::All) .sort(*sort_type) .creator_id(person.id) @@ -195,10 +195,10 @@ fn get_feed_community( sort_type: &SortType, community_name: String, ) -> Result { - let site_view = SiteView::read(&conn)?; - let community = Community::read_from_name(&conn, &community_name)?; + let site_view = SiteView::read(conn)?; + let community = Community::read_from_name(conn, &community_name)?; - let posts = PostQueryBuilder::create(&conn) + let posts = PostQueryBuilder::create(conn) .listing_type(ListingType::All) .sort(*sort_type) .community_id(community.id) @@ -225,14 +225,14 @@ fn get_feed_front( sort_type: &SortType, jwt: String, ) -> Result { - let site_view = SiteView::read(&conn)?; + let site_view = SiteView::read(conn)?; let local_user_id = LocalUserId(Claims::decode(&jwt)?.claims.sub); - let local_user = LocalUser::read(&conn, local_user_id)?; + let local_user = LocalUser::read(conn, local_user_id)?; let person_id = local_user.person_id; let show_bot_accounts = local_user.show_bot_accounts; let show_read_posts = local_user.show_read_posts; - let posts = PostQueryBuilder::create(&conn) + let posts = PostQueryBuilder::create(conn) .listing_type(ListingType::Subscribed) .my_person_id(person_id) .show_bot_accounts(show_bot_accounts) @@ -257,22 +257,22 @@ fn get_feed_front( } fn get_feed_inbox(conn: &PgConnection, jwt: String) -> Result { - let site_view = SiteView::read(&conn)?; + let site_view = SiteView::read(conn)?; let local_user_id = LocalUserId(Claims::decode(&jwt)?.claims.sub); - let local_user = LocalUser::read(&conn, local_user_id)?; + let local_user = LocalUser::read(conn, local_user_id)?; let person_id = local_user.person_id; let show_bot_accounts = local_user.show_bot_accounts; let sort = SortType::New; - let replies = CommentQueryBuilder::create(&conn) + let replies = CommentQueryBuilder::create(conn) .recipient_id(person_id) .my_person_id(person_id) .show_bot_accounts(show_bot_accounts) .sort(sort) .list()?; - let mentions = PersonMentionQueryBuilder::create(&conn) + let mentions = PersonMentionQueryBuilder::create(conn) .recipient_id(person_id) .my_person_id(person_id) .sort(sort) diff --git a/crates/routes/src/images.rs b/crates/routes/src/images.rs index fe23fe029..44d339713 100644 --- a/crates/routes/src/images.rs +++ b/crates/routes/src/images.rs @@ -1,8 +1,8 @@ -use actix::clock::Duration; use actix_web::{body::BodyStream, http::StatusCode, *}; use awc::Client; use lemmy_utils::{claims::Claims, rate_limit::RateLimit, settings::structs::Settings}; use serde::{Deserialize, Serialize}; +use std::time::Duration; pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) { let client = Client::builder() diff --git a/crates/utils/Cargo.toml b/crates/utils/Cargo.toml index f8c2012db..494ba68d4 100644 --- a/crates/utils/Cargo.toml +++ b/crates/utils/Cargo.toml @@ -9,31 +9,31 @@ path = "src/lib.rs" doctest = false [dependencies] -regex = "1.4.3" +regex = "1.5.4" chrono = { version = "0.4.19", features = ["serde"] } -lettre = "0.10.0-alpha.5" +lettre = "0.10.0-rc.3" log = "0.4.14" -itertools = "0.10.0" -rand = "0.8.3" +itertools = "0.10.1" +rand = "0.8.4" percent-encoding = "2.1.0" -serde = { version = "1.0.123", features = ["derive"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } -thiserror = "1.0.23" -comrak = { version = "0.9.0", default-features = false } +serde = { version = "1.0.126", features = ["derive"] } +serde_json = { version = "1.0.64", features = ["preserve_order"] } +thiserror = "1.0.25" +comrak = { version = "0.10.1", default-features = false } lazy_static = "1.4.0" -openssl = "0.10.32" -url = { version = "2.2.1", features = ["serde"] } +openssl = "0.10.35" +url = { version = "2.2.2", features = ["serde"] } actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] } -actix-rt = { version = "1.1.1", default-features = false } -anyhow = "1.0.38" -reqwest = { version = "0.10.10", features = ["json"] } -tokio = { version = "0.3.6", features = ["sync"] } -strum = "0.20.0" -strum_macros = "0.20.1" -futures = "0.3.12" -diesel = "1.4.5" -http = "0.2.3" +actix-rt = { version = "2.2.0", default-features = false } +anyhow = "1.0.41" +reqwest = { version = "0.11.4", features = ["json"] } +tokio = { version = "1.7.1", features = ["sync"] } +strum = "0.21.0" +strum_macros = "0.21.1" +futures = "0.3.15" +diesel = "1.4.7" +http = "0.2.4" jsonwebtoken = "7.2.0" -deser-hjson = "0.1.12" +deser-hjson = "1.0.1" merge = "0.1.0" envy = "0.4.2" diff --git a/crates/utils/src/claims.rs b/crates/utils/src/claims.rs index 3a444b9a4..8cd5796ef 100644 --- a/crates/utils/src/claims.rs +++ b/crates/utils/src/claims.rs @@ -21,7 +21,7 @@ impl Claims { ..Validation::default() }; decode::( - &jwt, + jwt, &DecodingKey::from_secret(Settings::get().jwt_secret().as_ref()), &v, ) diff --git a/crates/utils/src/email.rs b/crates/utils/src/email.rs index ead534924..e2853fa49 100644 --- a/crates/utils/src/email.rs +++ b/crates/utils/src/email.rs @@ -49,21 +49,13 @@ pub fn send_email( MultiPart::alternative() .singlepart( SinglePart::builder() - .header(header::ContentType( - "text/plain; charset=utf8" - .parse() - .expect("email could not parse header"), - )) + .header(header::ContentType::TEXT_PLAIN) .body(html.to_string()), ) .multipart( MultiPart::related().singlepart( SinglePart::builder() - .header(header::ContentType( - "text/html; charset=utf8" - .parse() - .expect("email could not parse header"), - )) + .header(header::ContentType::TEXT_HTML) .body(html.to_string()), ), ), diff --git a/crates/utils/src/request.rs b/crates/utils/src/request.rs index 66d0b11d1..f14a6c1ac 100644 --- a/crates/utils/src/request.rs +++ b/crates/utils/src/request.rs @@ -134,7 +134,7 @@ pub async fn fetch_iframely_and_pictrs_data( } }, // Try to generate a small thumbnail if iframely is not supported - None => match fetch_pictrs(client, &url).await { + None => match fetch_pictrs(client, url).await { Ok(res) => Some(res.files[0].file.to_owned()), Err(e) => { error!("pictrs err: {}", e); diff --git a/crates/utils/src/test.rs b/crates/utils/src/test.rs index da38299a8..2d9d417f3 100644 --- a/crates/utils/src/test.rs +++ b/crates/utils/src/test.rs @@ -71,7 +71,7 @@ fn test_slur_filter() { "faggot test kike tranny cocksucker retardeds. Capitalized Niggerz. This is a bunch of other safe text."; let slur_free = "No slurs here"; assert_eq!( - remove_slurs(&test), + remove_slurs(test), "*removed* test *removed* *removed* *removed* *removed*. Capitalized *removed*. This is a bunch of other safe text." .to_string() ); diff --git a/crates/utils/src/utils.rs b/crates/utils/src/utils.rs index 31936788a..7839436b6 100644 --- a/crates/utils/src/utils.rs +++ b/crates/utils/src/utils.rs @@ -13,7 +13,7 @@ lazy_static! { slurs.push('|'); slurs.push_str(&additional_slurs); }; - RegexBuilder::new(&&slurs).case_insensitive(true).build().expect("compile regex") + RegexBuilder::new(&slurs).case_insensitive(true).build().expect("compile regex") }; diff --git a/crates/websocket/Cargo.toml b/crates/websocket/Cargo.toml index e550d2b5f..b204ba8b7 100644 --- a/crates/websocket/Cargo.toml +++ b/crates/websocket/Cargo.toml @@ -13,18 +13,18 @@ lemmy_utils = { path = "../utils" } lemmy_api_common = { path = "../api_common" } lemmy_db_queries = { path = "../db_queries" } lemmy_db_schema = { path = "../db_schema" } -reqwest = { version = "0.10.10", features = ["json"] } +reqwest = { version = "0.11.4", features = ["json"] } log = "0.4.14" -rand = "0.8.3" -serde = { version = "1.0.123", features = ["derive"] } -serde_json = { version = "1.0.61", features = ["preserve_order"] } +rand = "0.8.4" +serde = { version = "1.0.126", features = ["derive"] } +serde_json = { version = "1.0.64", features = ["preserve_order"] } actix = "0.10.0" -anyhow = "1.0.38" -diesel = "1.4.5" -background-jobs = "0.8.0" -tokio = "0.3.6" -strum = "0.20.0" -strum_macros = "0.20.1" +anyhow = "1.0.41" +diesel = "1.4.7" +background-jobs = "0.9.0" +tokio = "1.7.1" +strum = "0.21.0" +strum_macros = "0.21.1" chrono = { version = "0.4.19", features = ["serde"] } actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] } actix-web-actors = { version = "3.0.0", default-features = false } diff --git a/crates/websocket/src/chat_server.rs b/crates/websocket/src/chat_server.rs index e08aa94a5..2e4fda2e4 100644 --- a/crates/websocket/src/chat_server.rs +++ b/crates/websocket/src/chat_server.rs @@ -29,6 +29,7 @@ use serde::Serialize; use serde_json::Value; use std::{ collections::{HashMap, HashSet}, + future::Future, str::FromStr, }; use tokio::macros::support::Pin; @@ -461,7 +462,7 @@ impl ChatServer { message: "Unknown op type".to_string(), })?; - if let Ok(user_operation_crud) = UserOperationCrud::from_str(&op) { + if let Ok(user_operation_crud) = UserOperationCrud::from_str(op) { let fut = (message_handler_crud)(context, msg.id, user_operation_crud.clone(), data); match user_operation_crud { UserOperationCrud::Register => rate_limiter.register().wrap(ip, fut).await, @@ -470,7 +471,7 @@ impl ChatServer { _ => rate_limiter.message().wrap(ip, fut).await, } } else { - let user_operation = UserOperation::from_str(&op)?; + let user_operation = UserOperation::from_str(op)?; let fut = (message_handler)(context, msg.id, user_operation.clone(), data); rate_limiter.message().wrap(ip, fut).await } diff --git a/src/code_migrations.rs b/src/code_migrations.rs index d8563b51b..cebf12936 100644 --- a/src/code_migrations.rs +++ b/src/code_migrations.rs @@ -28,13 +28,13 @@ use lemmy_utils::{apub::generate_actor_keypair, settings::structs::Settings, Lem use log::info; pub fn run_advanced_migrations(conn: &PgConnection) -> Result<(), LemmyError> { - user_updates_2020_04_02(&conn)?; - community_updates_2020_04_02(&conn)?; - post_updates_2020_04_03(&conn)?; - comment_updates_2020_04_03(&conn)?; - private_message_updates_2020_05_05(&conn)?; - post_thumbnail_url_updates_2020_07_27(&conn)?; - apub_columns_2021_02_02(&conn)?; + user_updates_2020_04_02(conn)?; + community_updates_2020_04_02(conn)?; + post_updates_2020_04_03(conn)?; + comment_updates_2020_04_03(conn)?; + private_message_updates_2020_05_05(conn)?; + post_thumbnail_url_updates_2020_07_27(conn)?; + apub_columns_2021_02_02(conn)?; Ok(()) } @@ -62,7 +62,7 @@ fn user_updates_2020_04_02(conn: &PgConnection) -> Result<(), LemmyError> { ..PersonForm::default() }; - Person::update(&conn, cperson.id, &form)?; + Person::update(conn, cperson.id, &form)?; } info!("{} person rows updated.", incorrect_persons.len()); @@ -106,7 +106,7 @@ fn community_updates_2020_04_02(conn: &PgConnection) -> Result<(), LemmyError> { shared_inbox_url: None, }; - Community::update(&conn, ccommunity.id, &form)?; + Community::update(conn, ccommunity.id, &form)?; } info!("{} community rows updated.", incorrect_communities.len()); @@ -127,7 +127,7 @@ fn post_updates_2020_04_03(conn: &PgConnection) -> Result<(), LemmyError> { for cpost in &incorrect_posts { let apub_id = generate_apub_endpoint(EndpointType::Post, &cpost.id.to_string())?; - Post::update_ap_id(&conn, cpost.id, apub_id)?; + Post::update_ap_id(conn, cpost.id, apub_id)?; } info!("{} post rows updated.", incorrect_posts.len()); @@ -148,7 +148,7 @@ fn comment_updates_2020_04_03(conn: &PgConnection) -> Result<(), LemmyError> { for ccomment in &incorrect_comments { let apub_id = generate_apub_endpoint(EndpointType::Comment, &ccomment.id.to_string())?; - Comment::update_ap_id(&conn, ccomment.id, apub_id)?; + Comment::update_ap_id(conn, ccomment.id, apub_id)?; } info!("{} comment rows updated.", incorrect_comments.len()); @@ -169,7 +169,7 @@ fn private_message_updates_2020_05_05(conn: &PgConnection) -> Result<(), LemmyEr for cpm in &incorrect_pms { let apub_id = generate_apub_endpoint(EndpointType::PrivateMessage, &cpm.id.to_string())?; - PrivateMessage::update_ap_id(&conn, cpm.id, apub_id)?; + PrivateMessage::update_ap_id(conn, cpm.id, apub_id)?; } info!("{} private message rows updated.", incorrect_pms.len()); diff --git a/src/scheduled_tasks.rs b/src/scheduled_tasks.rs index 4751e9ea2..a3b5f75db 100644 --- a/src/scheduled_tasks.rs +++ b/src/scheduled_tasks.rs @@ -41,7 +41,7 @@ fn reindex_aggregates_tables(conn: &PgConnection) { "comment_aggregates", "community_aggregates", ] { - reindex_table(&conn, &table_name); + reindex_table(conn, table_name); } } @@ -55,7 +55,7 @@ fn reindex_table(conn: &PgConnection, table_name: &str) { /// Clear old activities (this table gets very large) fn clear_old_activities(conn: &PgConnection) { info!("Clearing old activities..."); - Activity::delete_olds(&conn).expect("clear old activities"); + Activity::delete_olds(conn).expect("clear old activities"); info!("Done."); }