Rollup merge of #89649 - matthiaskrgr:clippycompl, r=jyn514
clippy::complexity fixes
This commit is contained in:
commit
836597a881
18 changed files with 23 additions and 30 deletions
|
@ -201,7 +201,7 @@ impl<'tcx> OutOfScopePrecomputer<'_, 'tcx> {
|
|||
let bb_data = &self.body[bb];
|
||||
debug_assert!(hi == bb_data.statements.len());
|
||||
for &succ_bb in bb_data.terminator().successors() {
|
||||
if self.visited.insert(succ_bb) == false {
|
||||
if !self.visited.insert(succ_bb) {
|
||||
if succ_bb == location.block && first_lo > 0 {
|
||||
// `succ_bb` has been seen before. If it wasn't
|
||||
// fully processed, add its first part to `stack`
|
||||
|
|
|
@ -972,8 +972,7 @@ fn suggest_ampmut<'tcx>(
|
|||
if let Some(assignment_rhs_span) = opt_assignment_rhs_span {
|
||||
if let Ok(src) = tcx.sess.source_map().span_to_snippet(assignment_rhs_span) {
|
||||
let is_mutbl = |ty: &str| -> bool {
|
||||
if ty.starts_with("mut") {
|
||||
let rest = &ty[3..];
|
||||
if let Some(rest) = ty.strip_prefix("mut") {
|
||||
match rest.chars().next() {
|
||||
// e.g. `&mut x`
|
||||
Some(c) if c.is_whitespace() => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue