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

use rustfmt::skip tool attribute #1090

Merged
merged 1 commit into from Jul 6, 2018

Conversation

Projects
None yet
2 participants
@bradjc
Copy link
Contributor

bradjc commented Jul 6, 2018

This uses new Rust syntax to indicate rustfmt skips which is much cleaner than the older syntax. The relevant RFC is here: rust-lang/rust#50030

Before:

#[cfg_attr(rustfmt, rustfmt_skip)]
const KEY: [u8; AES128_KEY_SIZE] = [
    0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
    0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
];

After:

#[rustfmt::skip]
const KEY: [u8; AES128_KEY_SIZE] = [
    0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
    0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
];

Testing Strategy

This pull request was tested by compiling.

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make formatall.
use rustfmt::skip tool attribute
Replaces older, clunky syntax.

rust-lang/rust#50030

@ppannuto ppannuto added the P-Upkeep label Jul 6, 2018

@ppannuto ppannuto merged commit 33f05e8 into master Jul 6, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@ppannuto ppannuto deleted the tool-attributes branch Jul 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment