Run clippy --fix for unnecessary_map_or lint

This commit is contained in:
Yotam Ofek 2025-01-19 19:15:00 +00:00
parent 39dc268459
commit 264fa0fc54
39 changed files with 61 additions and 67 deletions

View file

@ -350,10 +350,7 @@ pub fn strip_generics_from_path(path_str: &str) -> Result<Box<str>, MalformedGen
/// If there are no doc-comments, return true.
/// FIXME(#78591): Support both inner and outer attributes on the same item.
pub fn inner_docs(attrs: &[impl AttributeExt]) -> bool {
attrs
.iter()
.find(|a| a.doc_str().is_some())
.map_or(true, |a| a.style() == ast::AttrStyle::Inner)
attrs.iter().find(|a| a.doc_str().is_some()).is_none_or(|a| a.style() == ast::AttrStyle::Inner)
}
/// Has `#[rustc_doc_primitive]` or `#[doc(keyword)]`.