Skip to content

Commit

Permalink
Update for new lints arriving in 1.72 stable (#416)
Browse files Browse the repository at this point in the history
Previously there were extra spaces before some braces that cargo fmt
1.72 now removes. We also only suppressed the
`incorrect_clone_impl_on_copy_type` clippy warning on beta. This is now
suppressed for both stable and beta CI runs. This is *not* suppressed at
globally or at the usage location as it would violate our 1.62.1 MSRV.
  • Loading branch information
nick-mobilecoin authored Sep 7, 2023
2 parents ede6368 + 52adcf1 commit a7c90b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
toolchain: ${{ matrix.rust }}
components: clippy
- uses: r7kamura/rust-problem-matchers@v1
- run: cargo +${{ matrix.rust }} clippy --all --all-features -- -D warnings `${{ matrix.rust == 'beta' }} && echo "-Aclippy::incorrect_clone_impl_on_copy_type"`
- run: cargo +${{ matrix.rust }} clippy --all --all-features -- -D warnings -Aclippy::incorrect_clone_impl_on_copy_type

build:
runs-on: ubuntu-22.04
Expand Down
16 changes: 8 additions & 8 deletions dcap/types/src/certification_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ mod test {
let mut cert_data = [0u8; MIN_CERT_DATA_SIZE];
cert_data[0] = 5;
let certification_data = CertificationData::try_from(cert_data.as_slice()).unwrap();
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
panic!("expected a PckCertChain");
};
let cert_iter = cert_chain.into_iter();
Expand All @@ -453,7 +453,7 @@ mod test {
cert_data.extend(cert);

let certification_data = CertificationData::try_from(cert_data.as_slice()).unwrap();
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
panic!("expected a PckCertChain");
};
let cert_iter = cert_chain.into_iter();
Expand Down Expand Up @@ -486,7 +486,7 @@ mod test {
cert_chain.splice(2..2, size_bytes);

let certification_data = CertificationData::try_from(cert_chain.as_slice()).unwrap();
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
panic!("expected a PckCertChain");
};
let cert_iter = cert_chain.into_iter();
Expand All @@ -512,7 +512,7 @@ mod test {
cert_data.extend(pem);

let certification_data = CertificationData::try_from(cert_data.as_slice()).unwrap();
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
panic!("expected a PckCertChain");
};
let cert_iter = cert_chain.into_iter();
Expand Down Expand Up @@ -543,7 +543,7 @@ mod test {
cert_data.extend(pem);

let certification_data = CertificationData::try_from(cert_data.as_slice()).unwrap();
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
panic!("expected a PckCertChain");
};
let cert_iter = cert_chain.into_iter();
Expand Down Expand Up @@ -574,7 +574,7 @@ mod test {
cert_data.extend(pem);

let certification_data = CertificationData::try_from(cert_data.as_slice()).unwrap();
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
panic!("expected a PckCertChain");
};
let cert_iter = cert_chain.into_iter();
Expand Down Expand Up @@ -607,7 +607,7 @@ mod test {
cert_data.extend(key);

let certification_data = CertificationData::try_from(cert_data.as_slice()).unwrap();
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
panic!("expected a PckCertChain");
};
let cert_iter = cert_chain.into_iter();
Expand Down Expand Up @@ -646,7 +646,7 @@ mod test {
cert_chain.splice(2..2, size_bytes);

let certification_data = CertificationData::try_from(cert_chain.as_slice()).unwrap();
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
let CertificationData::PckCertificateChain(cert_chain) = certification_data else {
panic!("expected a PckCertChain");
};
let cert_iter = cert_chain.into_iter();
Expand Down

0 comments on commit a7c90b5

Please sign in to comment.