mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-28 06:29:51 +00:00
do not prune the AST output in standard JSON mode (#385)
- do not prune the AST output in standard JSON mode (required for foundry) - do not serialize the output format if there was not blob produced Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
1 parent
39a6db7266
commit
7346d82dfa
6 files changed
+19
-66
No files matched your search
@@ -12,7 +12,7 @@ use crate::standard_json::output::error::error_handler::ErrorHandler;
|
||||
use crate::SolcStandardJsonInputSettingsSelection;
|
||||
#[cfg(feature = "resolc")]
|
||||
use crate::SolcStandardJsonInputSource;
|
||||
#[cfg(feature = "parallel")]
|
||||
#[cfg(all(feature = "parallel", feature = "resolc"))]
|
||||
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
||||
|
||||
use self::contract::Contract;
|
||||
@@ -92,15 +92,6 @@ impl Output {
|
||||
mut self,
|
||||
selection_to_prune: SolcStandardJsonInputSettingsSelection,
|
||||
) -> ! {
|
||||
let sources = self.sources.values_mut().collect::<Vec<&mut Source>>();
|
||||
for source in sources.into_iter() {
|
||||
if selection_to_prune
|
||||
.contains(&crate::SolcStandardJsonInputSettingsSelectionFileFlag::AST)
|
||||
{
|
||||
source.ast = None;
|
||||
}
|
||||
}
|
||||
|
||||
let contracts = self
|
||||
.contracts
|
||||
.values_mut()
|
||||
|
||||
Reference in new issue
Block a user