From 4be5d24668b747cc273fcbfac0e6505ce9431278 Mon Sep 17 00:00:00 2001 From: Xynnn007 Date: Mon, 19 Feb 2024 10:54:48 +0800 Subject: [PATCH] lint: fix nightly lint error Signed-off-by: Xynnn007 --- attestation-service/attestation-service/src/config.rs | 1 - attestation-service/verifier/src/cca/mod.rs | 2 +- attestation-service/verifier/src/csv/mod.rs | 1 - attestation-service/verifier/src/sample/mod.rs | 1 - attestation-service/verifier/src/snp/mod.rs | 3 +-- attestation-service/verifier/src/tdx/eventlog.rs | 2 -- attestation-service/verifier/src/tdx/mod.rs | 3 +-- attestation-service/verifier/src/tdx/quote.rs | 1 - kbs/src/api/src/policy_engine/opa/mod.rs | 1 - 9 files changed, 3 insertions(+), 12 deletions(-) diff --git a/attestation-service/attestation-service/src/config.rs b/attestation-service/attestation-service/src/config.rs index 814136ad6..514d57bb7 100644 --- a/attestation-service/attestation-service/src/config.rs +++ b/attestation-service/attestation-service/src/config.rs @@ -5,7 +5,6 @@ use crate::{ use anyhow::{anyhow, Result}; use serde::Deserialize; -use std::convert::TryFrom; use std::fs::File; use std::path::{Path, PathBuf}; diff --git a/attestation-service/verifier/src/cca/mod.rs b/attestation-service/verifier/src/cca/mod.rs index af82e1188..01b89b072 100644 --- a/attestation-service/verifier/src/cca/mod.rs +++ b/attestation-service/verifier/src/cca/mod.rs @@ -4,7 +4,7 @@ // use super::*; -use anyhow::{anyhow, Context, Result}; +use anyhow::anyhow; use async_trait::async_trait; use base64::Engine; use core::result::Result::Ok; diff --git a/attestation-service/verifier/src/csv/mod.rs b/attestation-service/verifier/src/csv/mod.rs index 5756dd654..acf9c3963 100644 --- a/attestation-service/verifier/src/csv/mod.rs +++ b/attestation-service/verifier/src/csv/mod.rs @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 // -use anyhow::{Context, Result}; use log::{debug, warn}; extern crate serde; use self::serde::{Deserialize, Serialize}; diff --git a/attestation-service/verifier/src/sample/mod.rs b/attestation-service/verifier/src/sample/mod.rs index f935bddb4..575d4d6de 100644 --- a/attestation-service/verifier/src/sample/mod.rs +++ b/attestation-service/verifier/src/sample/mod.rs @@ -1,4 +1,3 @@ -use anyhow::{Context, Result}; use log::debug; extern crate serde; use self::serde::{Deserialize, Serialize}; diff --git a/attestation-service/verifier/src/snp/mod.rs b/attestation-service/verifier/src/snp/mod.rs index 3723ad510..918be3aa9 100644 --- a/attestation-service/verifier/src/snp/mod.rs +++ b/attestation-service/verifier/src/snp/mod.rs @@ -1,4 +1,4 @@ -use anyhow::{anyhow, Context, Result}; +use anyhow::anyhow; use base64::Engine; use log::debug; extern crate serde; @@ -255,7 +255,6 @@ pub(crate) fn parse_tee_evidence(report: &AttestationReport) -> TeeEvidenceParse mod tests { use super::*; use openssl::nid::Nid; - use sev::firmware::host::CertTableEntry; #[test] fn check_milan_certificates() { diff --git a/attestation-service/verifier/src/tdx/eventlog.rs b/attestation-service/verifier/src/tdx/eventlog.rs index 52c359953..fb9fdca33 100644 --- a/attestation-service/verifier/src/tdx/eventlog.rs +++ b/attestation-service/verifier/src/tdx/eventlog.rs @@ -2,8 +2,6 @@ use anyhow::*; use byteorder::{LittleEndian, ReadBytesExt}; use core::mem::size_of; use eventlog_rs::Eventlog; -use std::convert::{TryFrom, TryInto}; -use std::string::ToString; use strum::{Display, EnumString}; #[derive(Debug, Clone, EnumString, Display)] diff --git a/attestation-service/verifier/src/tdx/mod.rs b/attestation-service/verifier/src/tdx/mod.rs index 3b8c7dd07..a8eec2157 100644 --- a/attestation-service/verifier/src/tdx/mod.rs +++ b/attestation-service/verifier/src/tdx/mod.rs @@ -1,4 +1,4 @@ -use anyhow::{anyhow, Context, Result}; +use anyhow::anyhow; use log::{debug, warn}; use crate::tdx::claims::generate_parsed_claim; @@ -105,7 +105,6 @@ async fn verify_evidence( #[cfg(test)] mod tests { - use crate::tdx::claims::generate_parsed_claim; use super::*; use std::fs; diff --git a/attestation-service/verifier/src/tdx/quote.rs b/attestation-service/verifier/src/tdx/quote.rs index a7e65295a..cdf8d2bcb 100644 --- a/attestation-service/verifier/src/tdx/quote.rs +++ b/attestation-service/verifier/src/tdx/quote.rs @@ -6,7 +6,6 @@ use qvl::{ tee_qv_get_collateral, tee_supp_data_descriptor_t, tee_verify_quote, }; use scroll::Pread; -use std::convert::TryInto; use std::mem; use std::time::{Duration, SystemTime}; diff --git a/kbs/src/api/src/policy_engine/opa/mod.rs b/kbs/src/api/src/policy_engine/opa/mod.rs index c347796e8..be5b12505 100644 --- a/kbs/src/api/src/policy_engine/opa/mod.rs +++ b/kbs/src/api/src/policy_engine/opa/mod.rs @@ -110,7 +110,6 @@ impl PolicyEngineInterface for Opa { mod tests { use super::*; use base64::engine::general_purpose::URL_SAFE_NO_PAD; - use base64::Engine; use serde_json::json; fn dummy_input(product_id: &str, svn: u64) -> String {