mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
unnecessary_lazy_evaluations
This commit is contained in:
parent
f15ee8a380
commit
c4302eaa56
4 changed files with 3 additions and 3 deletions
|
@ -181,7 +181,6 @@ non_canonical_partial_ord_impl = "allow"
|
|||
self_named_constructors = "allow"
|
||||
too_many_arguments = "allow"
|
||||
type_complexity = "allow"
|
||||
unnecessary_lazy_evaluations = "allow"
|
||||
unnecessary_mut_passed = "allow"
|
||||
useless_conversion = "allow"
|
||||
useless_format = "allow"
|
||||
|
|
|
@ -166,6 +166,7 @@ enum PositionUsedAs {
|
|||
}
|
||||
use PositionUsedAs::*;
|
||||
|
||||
#[allow(clippy::unnecessary_lazy_evaluations)]
|
||||
pub(crate) fn parse(
|
||||
s: &ast::String,
|
||||
fmt_snippet: Option<String>,
|
||||
|
|
|
@ -230,7 +230,7 @@ impl Attr {
|
|||
)
|
||||
)
|
||||
})
|
||||
.unwrap_or_else(|| tt.len());
|
||||
.unwrap_or(tt.len());
|
||||
|
||||
let (path, input) = tt.split_at(path_end);
|
||||
let path = Interned::new(ModPath::from_tt(db, path)?);
|
||||
|
|
|
@ -297,7 +297,7 @@ fn as_module_def_if_namespace_matches(
|
|||
AssocItem::TypeAlias(it) => (ModuleDef::TypeAlias(it), Namespace::Types),
|
||||
};
|
||||
|
||||
(ns.unwrap_or(expected_ns) == expected_ns).then(|| DocLinkDef::ModuleDef(def))
|
||||
(ns.unwrap_or(expected_ns) == expected_ns).then_some(DocLinkDef::ModuleDef(def))
|
||||
}
|
||||
|
||||
fn modpath_from_str(link: &str) -> Option<ModPath> {
|
||||
|
|
Loading…
Reference in a new issue