"highlight_if_we_cannot_match_hir_ty: type_name={:?} needle_fr={:?}",
type_name, needle_fr
);
- if type_name.find(&format!("'{}", counter)).is_some() {
+ if type_name.contains(&format!("'{}", counter)) {
// Only add a label if we can confirm that a region was labelled.
RegionNameHighlight::CannotMatchHirTy(span, type_name)
} else {
_,
))) => {
debug!("saw end of shortcut link to {}", dest);
- if self.links.iter().find(|&link| *link.href == **dest).is_some() {
+ if self.links.iter().any(|link| *link.href == **dest) {
assert!(self.shortcut_link.is_some(), "saw closing link without opening tag");
self.shortcut_link = None;
}