Use is_some_and
/is_ok_and
in less obvious spots
This commit is contained in:
parent
fb0f74a8c9
commit
307799a711
19 changed files with 53 additions and 88 deletions
|
@ -285,15 +285,11 @@ pub trait Emitter: Translate {
|
|||
format!(
|
||||
"help: {}{}: `{}`",
|
||||
&msg,
|
||||
if self
|
||||
.source_map()
|
||||
.map(|sm| is_case_difference(
|
||||
sm,
|
||||
substitution,
|
||||
sugg.substitutions[0].parts[0].span,
|
||||
))
|
||||
.unwrap_or(false)
|
||||
{
|
||||
if self.source_map().is_some_and(|sm| is_case_difference(
|
||||
sm,
|
||||
substitution,
|
||||
sugg.substitutions[0].parts[0].span,
|
||||
)) {
|
||||
" (notice the capitalization)"
|
||||
} else {
|
||||
""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue