Auto-fix clippy::collapsible_if violations (#36428)
Release Notes: - N/A
This commit is contained in:
@@ -510,12 +510,12 @@ fn is_refineable_field(f: &Field) -> bool {
|
||||
}
|
||||
|
||||
fn is_optional_field(f: &Field) -> bool {
|
||||
if let Type::Path(typepath) = &f.ty {
|
||||
if typepath.qself.is_none() {
|
||||
let segments = &typepath.path.segments;
|
||||
if segments.len() == 1 && segments.iter().any(|s| s.ident == "Option") {
|
||||
return true;
|
||||
}
|
||||
if let Type::Path(typepath) = &f.ty
|
||||
&& typepath.qself.is_none()
|
||||
{
|
||||
let segments = &typepath.path.segments;
|
||||
if segments.len() == 1 && segments.iter().any(|s| s.ident == "Option") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user