mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 21:58:01 +00:00
solc-json-interface: do not unconditionally skip serialization of custom keys (#337)
The data structure can be used to build the JSON input for `resolc` too. In that case serializing of provided custom options should not be dismissed. Makes the memory settings struct more modular as a drive-by. --------- Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ pub struct Settings {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub metadata: Option<Metadata>,
|
||||
/// The resolc custom PolkaVM settings.
|
||||
#[serde(skip_serializing)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub polkavm: Option<PolkaVM>,
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ impl Settings {
|
||||
|
||||
/// Sets the necessary defaults.
|
||||
pub fn normalize(&mut self, version: &semver::Version) {
|
||||
self.polkavm = None;
|
||||
self.optimizer.normalize(version);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user