Skip to content

Commit

Permalink
clippy: resolve build errors for Rust 1.78
Browse files Browse the repository at this point in the history
  • Loading branch information
eugkoira committed May 14, 2024
1 parent be13960 commit 2a5add1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/enclave_proc/resource_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,13 @@ pub struct EnclaveManager {
enclave_handle: Arc<Mutex<EnclaveHandle>>,
}

impl ToString for EnclaveState {
fn to_string(&self) -> String {
impl std::fmt::Display for EnclaveState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
EnclaveState::Empty => "EMPTY",
EnclaveState::Running => "RUNNING",
EnclaveState::Terminating => "TERMINATING",
EnclaveState::Empty => write!(f, "EMPTY"),
EnclaveState::Running => write!(f, "RUNNING"),
EnclaveState::Terminating => write!(f, "TERMINATING"),
}
.to_string()
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ pub fn describe_eif(eif_path: String) -> NitroCliResult<EifDescribeInfo> {
};

// Check if signature section is present
if measurements.get(&"PCR8".to_string()).is_some() {
if measurements.contains_key("PCR8") {
let cert_info = eif_reader
.get_certificate_info(measurements)
.map_err(|err| {
Expand Down

0 comments on commit 2a5add1

Please sign in to comment.