Skip to content

Commit 5b42d05

Browse files
committed
Project::update_output_selection
1 parent 831873d commit 5b42d05

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

crates/compilers/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,15 @@ impl<T: ArtifactOutput, C: Compiler> Project<C, T> {
449449

450450
Ok(paths.remove(0))
451451
}
452+
453+
/// Invokes [CompilerSettings::update_output_selection] on the project's settings and all
454+
/// additional settings profiles.
455+
pub fn update_output_selection(&mut self, f: impl FnOnce(&mut OutputSelection) + Copy) {
456+
self.settings.update_output_selection(f);
457+
self.additional_settings.iter_mut().for_each(|(_, s)| {
458+
s.update_output_selection(f);
459+
});
460+
}
452461
}
453462

454463
pub struct ProjectBuilder<C: Compiler = MultiCompiler, T: ArtifactOutput = ConfigurableArtifacts> {

crates/compilers/src/project_util/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ impl<T: ArtifactOutput + Default> TempProject<MultiCompiler, T> {
5757
pub fn set_solc(&mut self, solc: &str) -> &mut Self {
5858
use crate::solc::{Solc, SolcCompiler};
5959

60-
self.inner.compiler.solc = SolcCompiler::Specific(
60+
self.inner.compiler.solc = Some(SolcCompiler::Specific(
6161
Solc::find_svm_installed_version(&solc.parse().unwrap()).unwrap().unwrap(),
62-
);
62+
));
6363

6464
self
6565
}

0 commit comments

Comments
 (0)