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

Add ProjectCompileOutput::has_compiler_warnings #773

Merged
merged 2 commits into from
Jan 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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