diff --git a/xtask/src/ui_commands.rs b/xtask/src/ui_commands.rs index bb8d8dfdd..4bf12a272 100644 --- a/xtask/src/ui_commands.rs +++ b/xtask/src/ui_commands.rs @@ -377,10 +377,10 @@ fn reexport_targets<'a>(src: &'a str, const_name: &str) -> Vec> { if hit { out.push(path.split("::").collect()); } - } else if let Some((path, name)) = rest.rsplit_once("::") { - if name.trim() == const_name { - out.push(path.split("::").collect()); - } + } else if let Some((path, name)) = rest.rsplit_once("::") + && name.trim() == const_name + { + out.push(path.split("::").collect()); } } out