From 91eb488d4c9278de4c261d16adab03dc54d27fef Mon Sep 17 00:00:00 2001 From: Jarry Xiao Date: Tue, 31 Jan 2023 15:33:39 -0500 Subject: [PATCH] remove toml and serde deps --- Cargo.lock | 52 +++------------------------------------------------- Cargo.toml | 3 --- src/main.rs | 13 +------------ 3 files changed, 4 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a05d65a..9d9d9c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2144,7 +2144,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml 0.5.11", + "toml", ] [[package]] @@ -2154,7 +2154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" dependencies = [ "once_cell", - "toml_edit 0.18.1", + "toml_edit", ] [[package]] @@ -2699,15 +2699,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_spanned" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3392,12 +3383,9 @@ dependencies = [ "clap 4.1.4", "cmd_lib", "hex 0.3.2", - "serde", - "serde_json", "sha256", "solana-client", "solana-sdk", - "toml 0.7.1", ] [[package]] @@ -3816,33 +3804,12 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772c1426ab886e7362aedf4abc9c0d1348a979517efedfc25862944d10137af0" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime 0.6.1", - "toml_edit 0.19.1", -] - [[package]] name = "toml_datetime" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" -[[package]] -name = "toml_datetime" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" -dependencies = [ - "serde", -] - [[package]] name = "toml_edit" version = "0.18.1" @@ -3851,20 +3818,7 @@ checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" dependencies = [ "indexmap", "nom8", - "toml_datetime 0.5.1", -] - -[[package]] -name = "toml_edit" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a238ee2e6ede22fb95350acc78e21dc40da00bb66c0334bde83de4ed89424e" -dependencies = [ - "indexmap", - "nom8", - "serde", - "serde_spanned", - "toml_datetime 0.6.1", + "toml_datetime", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7dd967f..3f0b2e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,3 @@ solana-client = "1.14.10" solana-sdk = "1.14.10" sha256 = "1.1.1" hex = "0.3.1" -serde = { version = "1.0.130", features = ["derive"] } -serde_json = "1.0.68" -toml = "0.7.1" diff --git a/src/main.rs b/src/main.rs index 3fa8229..8acaada 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,7 @@ -use std::{io::Read, path::Path}; +use std::io::Read; use clap::{Parser, Subcommand}; use cmd_lib::{init_builtin_logger, run_cmd, run_fun}; -use serde::Deserialize; use solana_client::rpc_client::RpcClient; use solana_sdk::{ bpf_loader_upgradeable::{self, UpgradeableLoaderState}, @@ -16,16 +15,6 @@ struct Arguments { subcommand: SubCommand, } -#[derive(Deserialize, Debug)] -struct Config { - package: Package, -} - -#[derive(Deserialize, Debug)] -struct Package { - name: String, -} - #[derive(Subcommand, Debug)] enum SubCommand { /// Deterministically build the program in an Docker container