mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 04:27:58 +00:00
solc-json-interface: make the input Cloneable (#323)
It helps external consumers working with the `revive-solc-json-interface` crate. Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ use self::settings::Settings;
|
||||
use self::source::Source;
|
||||
|
||||
/// The `solc --standard-json` input.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Input {
|
||||
/// The input language.
|
||||
|
||||
@@ -6,7 +6,7 @@ use serde::Serialize;
|
||||
use crate::standard_json::input::settings::metadata_hash::MetadataHash;
|
||||
|
||||
/// The `solc --standard-json` input settings metadata.
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Metadata {
|
||||
/// The bytecode hash mode.
|
||||
|
||||
@@ -18,7 +18,7 @@ use self::polkavm::PolkaVM;
|
||||
use self::selection::Selection;
|
||||
|
||||
/// The `solc --standard-json` input settings.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Settings {
|
||||
/// The target EVM version.
|
||||
|
||||
@@ -4,7 +4,7 @@ use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
/// The `solc --standard-json` input settings optimizer details.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Details {
|
||||
/// Whether the pass is enabled.
|
||||
|
||||
@@ -8,7 +8,7 @@ use serde::Serialize;
|
||||
use self::details::Details;
|
||||
|
||||
/// The `solc --standard-json` input settings optimizer.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Optimizer {
|
||||
/// Whether the optimizer is enabled.
|
||||
|
||||
@@ -10,7 +10,7 @@ use serde::Serialize;
|
||||
use self::flag::Flag as SelectionFlag;
|
||||
|
||||
/// The `solc --standard-json` output file selection.
|
||||
#[derive(Debug, Default, Serialize, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq)]
|
||||
pub struct File {
|
||||
/// The per-file output selections.
|
||||
#[serde(rename = "", skip_serializing_if = "Option::is_none")]
|
||||
|
||||
@@ -10,7 +10,7 @@ use serde::Serialize;
|
||||
use self::file::File as FileSelection;
|
||||
|
||||
/// The `solc --standard-json` output selection.
|
||||
#[derive(Debug, Serialize, Deserialize, Default, PartialEq)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, Default, PartialEq)]
|
||||
pub struct Selection {
|
||||
/// Only the 'all' wildcard is available for robustness reasons.
|
||||
#[serde(rename = "*", skip_serializing_if = "Option::is_none")]
|
||||
|
||||
@@ -7,7 +7,7 @@ use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
/// The `solc --standard-json` input source.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Source {
|
||||
/// The source code file content.
|
||||
|
||||
Reference in New Issue
Block a user