-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix formatting inconsistencies #123325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix formatting inconsistencies #123325
Conversation
I really hope there isn't any kind of backdoor snuck in somewhere /s |
I pinky promise there isn't one |
good enough, thanks |
The job Click to see the possible cause of the failure (guessed by this bot)
|
I like it a lot, thanks. |
I strongly prefer this style: use std::env;
fn main()
{
let target_os = env::var("CARGO_CFG_TARGET_OS");
let target_env = env::var("CARGO_CFG_TARGET_ENV");
if Ok("windows") == target_os.as_deref() && Ok("msvc") == target_env.as_deref() {
set_windows_exe_options();}
else {
println!("cargo:rerun-if-changed=build.rs");}}// Avoid rerunning the build script every time.
fn set_windows_exe_options()
{// Add a manifest file to rustc.exe.
static WINDOWS_MANIFEST_FILE: &str = "Windows Manifest.xml";
let mut manifest = env::current_dir().unwrap();
manifest.push(WINDOWS_MANIFEST_FILE);
println!("cargo:rerun-if-changed={WINDOWS_MANIFEST_FILE}");// Embed the Windows application manifest file.
println!("cargo:rustc-link-arg-bin=rustc-main=/MANIFEST:EMBED");
println!("cargo:rustc-link-arg-bin=rustc-main=/MANIFESTINPUT:{}", manifest.to_str().unwrap());// Turn linker warnings into errors.
println!("cargo:rustc-link-arg-bin=rustc-main=/WX");} Benefits:
Drawbacks:
|
☔ The latest upstream changes (presumably #123320) made this pull request unmergeable. Please resolve the merge conflicts. |
This new format still wastes excessive horizontal space. Please use |
This change is best appreciated using the side-by-side diff viewer. Compiles locally, but tidy is raising some errors.
Unccl Ncevy Sbbyf!