diff options
| author | Yotam Ofek <yotam.ofek@gmail.com> | 2025-01-19 19:15:00 +0000 |
|---|---|---|
| committer | Yotam Ofek <yotam.ofek@gmail.com> | 2025-01-19 19:15:00 +0000 |
| commit | 264fa0fc5430f3a9a52a92df706d7c9ac5af4f85 (patch) | |
| tree | 0bbd37338339064a435083342483f5b6012f4694 /compiler/rustc_resolve/src/rustdoc.rs | |
| parent | 39dc268459b4bd8b771e500169bea67850fad30d (diff) | |
| download | rust-264fa0fc5430f3a9a52a92df706d7c9ac5af4f85.tar.gz rust-264fa0fc5430f3a9a52a92df706d7c9ac5af4f85.zip | |
Run `clippy --fix` for `unnecessary_map_or` lint
Diffstat (limited to 'compiler/rustc_resolve/src/rustdoc.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/rustdoc.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_resolve/src/rustdoc.rs b/compiler/rustc_resolve/src/rustdoc.rs index 7998596c59e..fecb9735019 100644 --- a/compiler/rustc_resolve/src/rustdoc.rs +++ b/compiler/rustc_resolve/src/rustdoc.rs @@ -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)]`. |
