Skip to content

Commit

Permalink
fix clippy::explicit_auto_deref
Browse files Browse the repository at this point in the history
Signed-off-by: Petre Eftime <[email protected]>
  • Loading branch information
Petre Eftime authored and petreeftime committed Nov 21, 2022
1 parent a41e296 commit a80cda0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/enclave_proc/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ pub fn get_slot_id(enclave_id: String) -> Result<u64, String> {
let tokens: Vec<&str> = enclave_id.split("-enc").collect();

match tokens.get(1) {
Some(slot_id) => u64::from_str_radix(*slot_id, 16)
.map_err(|_err| "Invalid enclave id format".to_string()),
Some(slot_id) => {
u64::from_str_radix(slot_id, 16).map_err(|_err| "Invalid enclave id format".to_string())
}
None => Err("Invalid enclave_id.".to_string()),
}
}
Expand Down

0 comments on commit a80cda0

Please sign in to comment.