From 6ef6af9b583676cdaff3231c22610121f7066bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Eng=C3=A9libert?= Date: Sat, 1 Apr 2023 00:40:54 +0200 Subject: [PATCH] gpt trial, more style, less deps --- Cargo.lock | 58 +---------------------------------------------------- Cargo.toml | 2 +- src/main.rs | 32 ++++++++++++++++++++++++++--- 3 files changed, 31 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 355dae0..cc4434c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1004,16 +1004,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d" -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.17" @@ -1161,29 +1151,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "windows-sys 0.45.0", -] - [[package]] name = "percent-encoding" version = "2.2.0" @@ -1362,15 +1329,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - [[package]] name = "redox_syscall" version = "0.3.5" @@ -1463,12 +1421,6 @@ dependencies = [ "windows-sys 0.42.0", ] -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - [[package]] name = "security-framework" version = "2.8.2" @@ -1635,12 +1587,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - [[package]] name = "socket2" version = "0.4.9" @@ -1754,7 +1700,7 @@ checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", + "redox_syscall", "rustix", "windows-sys 0.45.0", ] @@ -1865,9 +1811,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot", "pin-project-lite 0.2.9", - "signal-hook-registry", "socket2", "tokio-macros", "windows-sys 0.45.0", diff --git a/Cargo.toml b/Cargo.toml index c721203..ea5fabe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ percent-encoding = "2.2.0" rand = "0.8.5" reqwest = { version = "0.11.16", features = ["blocking", "brotli", "deflate", "gzip"] } tide = { version = "0.16.0", default-features = false, features = ["h1-server", "logger"] } -tokio = { version = "1.27.0", features = ["full"] } +tokio = { version = "1.27.0", features = ["macros", "rt", "rt-multi-thread"] } #roxmltree = { version = "0.18.0", default-features = false, features = ["std"] } #rxml = "0.9.1" #rxml = { path = "/home/tuxmain/Téléchargements/rxml/rxml" } diff --git a/src/main.rs b/src/main.rs index f108041..5b44acf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -172,6 +172,7 @@ async fn handle_request<'a>(_req: tide::Request<()>) -> tide::Result MLeTomatic +