From 3c9f109e667ca5d12739e6553fdb8261378f4ecf Mon Sep 17 00:00:00 2001 From: Tarrence van As Date: Wed, 1 Nov 2023 21:39:10 -0400 Subject: [PATCH] Build fixes (#1137) * Fix clippy * Use rust-tls --- Cargo.lock | 97 ---------------------------------- crates/torii/core/Cargo.toml | 2 +- crates/torii/core/src/model.rs | 2 +- 3 files changed, 2 insertions(+), 99 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 78a2ce771c..5e9cac9fe6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2991,21 +2991,6 @@ version = "1.0.7" source = "registry+/~https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.0" @@ -4347,19 +4332,6 @@ dependencies = [ "tokio-io-timeout", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "iana-time-zone" version = "0.1.58" @@ -5262,24 +5234,6 @@ version = "0.8.3" source = "registry+/~https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "ndarray" version = "0.13.1" @@ -5542,50 +5496,12 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "openssl" -version = "0.10.57" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+/~https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.93" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-ext" version = "0.2.0" @@ -6417,12 +6333,10 @@ dependencies = [ "http-body", "hyper", "hyper-rustls 0.24.2", - "hyper-tls", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -6433,7 +6347,6 @@ dependencies = [ "serde_urlencoded", "system-configuration", "tokio", - "tokio-native-tls", "tokio-rustls 0.24.1", "tower-service", "url", @@ -8054,16 +7967,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.23.4" diff --git a/crates/torii/core/Cargo.toml b/crates/torii/core/Cargo.toml index 829cddce9d..d6020e930d 100644 --- a/crates/torii/core/Cargo.toml +++ b/crates/torii/core/Cargo.toml @@ -21,7 +21,7 @@ hex.workspace = true lazy_static.workspace = true log = "0.4.17" once_cell.workspace = true -reqwest = { version = "0.11.22", features = [ "blocking" ] } +reqwest = { version = "0.11.22", features = [ "blocking", "rustls-tls" ], default-features = false } scarb-ui.workspace = true serde.workspace = true serde_json.workspace = true diff --git a/crates/torii/core/src/model.rs b/crates/torii/core/src/model.rs index fad073317f..e701cf28e0 100644 --- a/crates/torii/core/src/model.rs +++ b/crates/torii/core/src/model.rs @@ -40,7 +40,7 @@ impl ModelSQLReader { let layout = hex::decode(layout).unwrap(); let layout = layout.iter().map(|e| FieldElement::from(*e)).collect(); - Ok(Self { name: name.clone(), class_hash, pool, packed_size, unpacked_size, layout }) + Ok(Self { name, class_hash, pool, packed_size, unpacked_size, layout }) } }