Fix rustdoc help message when no args are passed

This commit is contained in:
bjorn3
2024-03-26 10:27:19 +00:00
parent dc6595ddbc
commit ad1886a5f0
3 changed files with 13 additions and 9 deletions

View File

@@ -26,9 +26,10 @@ fn main() {
codegen_backend_arg.push(cg_clif_dylib_path);
args.push(codegen_backend_arg);
}
if !passed_args.iter().any(|arg| {
arg == "--sysroot" || arg.to_str().is_some_and(|s| s.starts_with("--sysroot="))
}) {
if !passed_args
.iter()
.any(|arg| arg == "--sysroot" || arg.to_str().is_some_and(|s| s.starts_with("--sysroot=")))
{
args.push(OsString::from("--sysroot"));
args.push(OsString::from(sysroot.to_str().unwrap()));
}