Add `ProjectCompileOutput::has_compiler_warnings` (#773)
* Add `ProjectCompileOutput::has_compiler_warnings` * Nits
This commit is contained in:
parent
21a4adea3e
commit
86044bc0c3
|
@ -774,11 +774,12 @@ impl<T: ArtifactOutput> ProjectCompileOutput<T> {
|
||||||
|
|
||||||
/// Whether there were errors
|
/// Whether there were errors
|
||||||
pub fn has_compiler_errors(&self) -> bool {
|
pub fn has_compiler_errors(&self) -> bool {
|
||||||
if let Some(output) = self.compiler_output.as_ref() {
|
self.compiler_output.as_ref().map(|o| o.has_error()).unwrap_or_default()
|
||||||
output.has_error()
|
}
|
||||||
} else {
|
|
||||||
false
|
/// 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
|
/// Finds the first contract with the given name and removes it from the set
|
||||||
|
|
Loading…
Reference in New Issue