Changes for the Rust 1.59.0 update

bug: 215232614
Test: TreeHugger and compiling with m rust
Change-Id: I383ef63a00a9952e8351c1b4d6a264670da2ad3c
diff --git a/remote_provisioning/cert_validator/src/lib.rs b/remote_provisioning/cert_validator/src/lib.rs
index 15e16e8..b2668a5 100644
--- a/remote_provisioning/cert_validator/src/lib.rs
+++ b/remote_provisioning/cert_validator/src/lib.rs
@@ -93,7 +93,7 @@
             alg: Some(coset::Algorithm::PrivateUse(1000)),
             ..Default::default()
         };
-        assert!(!bcc::entry::check_protected_header(&eddsa, &header).is_ok());
+        assert!(bcc::entry::check_protected_header(&eddsa, &header).is_err());
         let mut header = Header {
             alg: (&eddsa).clone(),
             ..Default::default()
@@ -115,7 +115,7 @@
         header.crit.push(RegisteredLabel::Assigned(
             iana::HeaderParameter::CounterSignature,
         ));
-        assert!(!bcc::entry::check_protected_header(&eddsa, &header).is_ok());
+        assert!(bcc::entry::check_protected_header(&eddsa, &header).is_err());
         Ok(())
     }
 }