}
_ => true,
};
- return if is_allowed_tag == false {
+ return if !is_allowed_tag {
if is_start {
Some(Event::Start(Tag::Paragraph))
} else {
"" => {}
"should_panic" => {
data.should_panic = true;
- seen_rust_tags = seen_other_tags == false;
+ seen_rust_tags = !seen_other_tags;
}
"no_run" => {
data.no_run = true;
x if x.starts_with("edition") => {
data.edition = x[7..].parse::<Edition>().ok();
}
- x if allow_error_code_check && x.starts_with("E") && x.len() == 5 => {
+ x if allow_error_code_check && x.starts_with('E') && x.len() == 5 => {
if x[1..].parse::<u32>().is_ok() {
data.error_codes.push(x.to_owned());
seen_rust_tags = !seen_other_tags || seen_rust_tags;
return String::new();
}
let replacer = |_: &str, s: &str| {
- if let Some(&(_, ref replace)) = links.into_iter().find(|link| &*link.0 == s) {
+ if let Some(&(_, ref replace)) = links.iter().find(|link| &*link.0 == s) {
Some((replace.clone(), s.to_owned()))
} else {
None
}
let replacer = |_: &str, s: &str| {
- if let Some(&(_, ref replace)) = links.into_iter().find(|link| &*link.0 == s) {
+ if let Some(&(_, ref replace)) = links.iter().find(|link| &*link.0 == s) {
Some((replace.clone(), s.to_owned()))
} else {
None