From 662e7ef7eacc44c0c84fa01d07c5c18419633c51 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Wed, 17 Nov 2021 23:07:04 +0000 Subject: [PATCH] Upgrade outdated dependencies --- Cargo.lock | 89 ++++++++++++++++++++++++++++++++++++++++++-------------------------------------- chartered-db/Cargo.toml | 5 ++--- chartered-fs/Cargo.toml | 4 ++-- chartered-git/Cargo.toml | 2 +- chartered-types/Cargo.toml | 2 +- chartered-web/Cargo.toml | 5 ++--- chartered-web/src/middleware/auth.rs | 4 ++-- 7 files changed, 46 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9a9a0b..5066df4 100644 --- a/Cargo.lock +++ a/Cargo.lock @@ -260,9 +260,9 @@ [[package]] name = "axum" -version = "0.3.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c3f630b925c7a85089ff794fdce495c88c80d38710f31eb9817c8399fd77ce" +checksum = "6b4e96976b2022b23b2199168ff9b281e9ddc1aa795607d5cb7146868ca5c101" dependencies = [ "async-trait", "bitflags", @@ -283,7 +283,7 @@ "tokio", "tokio-util", "tower", - "tower-http 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-http", "tower-layer", "tower-service", ] @@ -296,9 +296,9 @@ [[package]] name = "base64ct" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b4d9b1225d28d360ec6a231d65af1fd99a2a095154c8040689617290569c5c" +checksum = "392c772b012d685a640cdad68a5a21f4a45e696f85a2c2c907aab2fe49a91e19" [[package]] name = "bcrypt" @@ -417,9 +417,9 @@ [[package]] name = "cc" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" +checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" [[package]] name = "cfg-if" @@ -469,7 +469,6 @@ "hex", "http", "itertools", - "libsqlite3-sys", "option_set", "rand", "reqwest", @@ -573,7 +572,7 @@ "tokio", "toml", "tower", - "tower-http 0.1.1 (git+https://github.com/tower-rs/tower-http?branch=cors)", + "tower-http", "tracing", "tracing-subscriber", "url", @@ -1145,15 +1144,15 @@ [[package]] name = "httpdate" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.14" +version = "0.14.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b91bb1f221b6ea1f1e4371216b70f40748774c2fb5971b450c07773fb92d26b" +checksum = "436ec0091e4f20e655156a30a0df3770fe2900aa301e548e08446ec794b6953c" dependencies = [ "bytes", "futures-channel", @@ -1295,9 +1294,9 @@ [[package]] name = "libc" -version = "0.2.106" +version = "0.2.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a60553f9a9e039a333b4e9b20573b9e9b9c0bb3a11e201ccc48ef4283456d673" +checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219" [[package]] name = "libsodium-sys" @@ -1317,7 +1316,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" dependencies = [ - "cc", "pkg-config", "vcpkg", ] @@ -1393,9 +1391,9 @@ [[package]] name = "minimal-lexical" -version = "0.1.4" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c64630dcdd71f1a64c435f54885086a0de5d6a12d104d69b165fb7d5286d677" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" @@ -1449,9 +1447,9 @@ [[package]] name = "nom" -version = "7.0.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffd9d26838a953b4af82cbeb9f1592c6798916983959be223a7124e992742c1" +checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" dependencies = [ "memchr", "minimal-lexical", @@ -1503,9 +1501,9 @@ [[package]] name = "num-bigint" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e768dff5fb39a41b3bcd30bb25cf989706c90d028d1ad71971987aa309d535" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ "autocfg", "num-integer", @@ -1625,9 +1623,9 @@ [[package]] name = "openssl-sys" -version = "0.9.70" +version = "0.9.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6517987b3f8226b5da3661dad65ff7f300cc59fb5ea8333ca191fc65fde3edf" +checksum = "7df13d165e607909b363a4757a6f133f8a818a74e9d3a98d09c6128e15fa4c73" dependencies = [ "autocfg", "cc", @@ -2109,9 +2107,9 @@ [[package]] name = "serde_json" -version = "1.0.68" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" +checksum = "063bf466a64011ac24040a49009724ee60a57da1b437617ceb32e53ad61bfb19" dependencies = [ "indexmap", "itoa", @@ -2453,7 +2451,7 @@ "hmac", "log", "md5", - "num-bigint 0.4.2", + "num-bigint 0.4.3", "num-integer", "pbkdf2", "rand", @@ -2493,9 +2491,9 @@ [[package]] name = "tinyvec" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" +checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" dependencies = [ "tinyvec_macros", ] @@ -2508,9 +2506,9 @@ [[package]] name = "tokio" -version = "1.13.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee" +checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144" dependencies = [ "autocfg", "bytes", @@ -2528,9 +2526,9 @@ [[package]] name = "tokio-macros" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "114383b041aa6212c579467afa0075fbbdd0718de036100bc0ba7961d8cb9095" +checksum = "c9efc1aba077437943f7515666aa2b882dfabfbfdf89c819ea75a8d6e9eaba5e" dependencies = [ "proc-macro2", "quote", @@ -2611,24 +2609,9 @@ [[package]] name = "tower-http" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b56efe69aa0ad2b5da6b942e57ea9f6fe683b7a314d4ff48662e2c8838de1" -dependencies = [ - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "pin-project", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.1.1" -source = "git+https://github.com/tower-rs/tower-http?branch=cors#9f09fc55bf74b5b9a8bd79cbede7e73d37a3e79b" +checksum = "6f70061b0592867f0a60e67a6e699da5fe000c88a360a5b92ebdba9d73b2238c" dependencies = [ "bytes", "futures-core", @@ -3033,11 +3016,11 @@ checksum = "e262a29d0e61ccf2b6190d7050d4b237535fc76ce4c1210d9caa316f71dffa75" dependencies = [ "bit-vec", - "num-bigint 0.4.2", + "num-bigint 0.4.3", ] [[package]] name = "zeroize" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf68b08513768deaa790264a7fac27a58cbf2705cfcdc9448362229217d7e970" +checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619" diff --git a/chartered-db/Cargo.toml b/chartered-db/Cargo.toml index beefcd0..f9c127d 100644 --- a/chartered-db/Cargo.toml +++ a/chartered-db/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "chartered-db" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -19,7 +19,6 @@ hex = "0.4" http = "0.2" itertools = "0.10" -libsqlite3-sys = { version = "*", features = ["bundled"], optional = true } # https://github.com/rusqlite/rusqlite/issues/914 option_set = "0.1" rand = "0.8" reqwest = "0.11" @@ -33,6 +32,6 @@ thrussh-keys = "0.21" [features] -sqlite = ["libsqlite3-sys", "diesel/sqlite", "diesel-tracing/sqlite"] +sqlite = ["diesel/sqlite", "diesel-tracing/sqlite"] postgres = ["diesel/postgres", "diesel-tracing/postgres"] diff --git a/chartered-fs/Cargo.toml b/chartered-fs/Cargo.toml index 0a8947f..ab4ba08 100644 --- a/chartered-fs/Cargo.toml +++ a/chartered-fs/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "chartered-fs" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -20,4 +20,4 @@ uuid = { version = "0.8", features = ["v4", "serde"] } [dev-dependencies] -tokio = { version = "1", features = ["rt", "macros"] }+tokio = { version = "1", features = ["rt", "macros"] } diff --git a/chartered-git/Cargo.toml b/chartered-git/Cargo.toml index d99708b..ad4034d 100644 --- a/chartered-git/Cargo.toml +++ a/chartered-git/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "chartered-git" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/chartered-types/Cargo.toml b/chartered-types/Cargo.toml index a5b8707..e664434 100644 --- a/chartered-types/Cargo.toml +++ a/chartered-types/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "chartered-types" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/chartered-web/Cargo.toml b/chartered-web/Cargo.toml index 0810010..4fef302 100644 --- a/chartered-web/Cargo.toml +++ a/chartered-web/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "chartered-web" authors = ["Jordan Doyle "] version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -34,8 +34,7 @@ thiserror = "1" tokio = { version = "1", features = ["full"] } tower = { version = "0.4", features = ["util", "filter"] } -# tower-http = { version = "0.1", features = ["trace", "set-header"] } -tower-http = { git = "https://github.com/tower-rs/tower-http", branch = "cors", features = ["trace", "set-header", "cors"] } +tower-http = { version = "0.1", features = ["trace", "set-header", "cors"] } toml = "0.5" tracing = "0.1" tracing-subscriber = "0.3" diff --git a/chartered-web/src/middleware/auth.rs b/chartered-web/src/middleware/auth.rs index 5357247..f69b15a 100644 --- a/chartered-web/src/middleware/auth.rs +++ a/chartered-web/src/middleware/auth.rs @@ -1,8 +1,8 @@ //! Check the API key embedded in the path is valid otherwise returns a 401 for authenticated //! endpoints. use axum::{ - body::{box_body, Body, BoxBody}, + body::{boxed, Body, BoxBody}, extract::{self, FromRequest, RequestParts}, http::{Request, Response, StatusCode}, }; @@ -70,7 +70,7 @@ None => { return Ok(Response::builder() .status(StatusCode::UNAUTHORIZED) - .body(box_body(Body::from( + .body(boxed(Body::from( serde_json::to_vec(&ErrorResponse { error: Some("Expired auth token".into()), }) -- rgit 0.1.3