Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Add ProjectCompileOutput::has_compiler_warnings (#773)
Browse files Browse the repository at this point in the history
* Add `ProjectCompileOutput::has_compiler_warnings`

* Nits
  • Loading branch information
onbjerg authored Jan 7, 2022
1 parent 21a4ade commit 86044bc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ethers-solc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,12 @@ impl<T: ArtifactOutput> ProjectCompileOutput<T> {

/// Whether there were errors
pub fn has_compiler_errors(&self) -> bool {
if let Some(output) = self.compiler_output.as_ref() {
output.has_error()
} else {
false
}
self.compiler_output.as_ref().map(|o| o.has_error()).unwrap_or_default()
}

/// Whether there were warnings
pub fn has_compiler_warnings(&self) -> bool {
self.compiler_output.as_ref().map(|o| o.has_warning()).unwrap_or_default()
}

/// Finds the first contract with the given name and removes it from the set
Expand Down

0 comments on commit 86044bc

Please sign in to comment.