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

Conversation

onbjerg
Copy link
Collaborator

@onbjerg onbjerg commented Jan 7, 2022

Missed this part for #772

Comment on lines 786 to 791
if let Some(output) = self.compiler_output.as_ref() {
output.has_warning()
} else {
false
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if let Some(output) = self.compiler_output.as_ref() {
output.has_warning()
} else {
false
}
}
self.compiler_output.as_ref().map(|o|o.has_warning()).unwrap_or_default()

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

@onbjerg
Copy link
Collaborator Author

onbjerg commented Jan 7, 2022

Want me to change this one too?

pub fn has_compiler_errors(&self) -> bool {
if let Some(output) = self.compiler_output.as_ref() {
output.has_error()
} else {
false
}
}

@mattsse
Copy link
Collaborator

mattsse commented Jan 7, 2022

sure! let's improve it consistently :)

thanks

Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gakonst gakonst merged commit 86044bc into gakonst:master Jan 7, 2022
@onbjerg onbjerg deleted the patch-1 branch January 7, 2022 15:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants