Simplify IfRequired needs parentheses condition (#6678)

This commit is contained in:
Micha Reiser 2023-08-21 09:11:31 +02:00 committed by GitHub
parent 2a8d24dd4b
commit 8b347cdaa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 13 deletions

View file

@ -23,12 +23,6 @@ pub(crate) enum OptionalParentheses {
Never,
}
impl OptionalParentheses {
pub(crate) const fn is_always(self) -> bool {
matches!(self, OptionalParentheses::Always)
}
}
pub(crate) trait NeedsParentheses {
/// Determines if this object needs optional parentheses or if it is safe to omit the parentheses.
fn needs_parentheses(