Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OverOrion committed Feb 20, 2023
1 parent 68fff49 commit 02de806
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core-primitives/enclave-api/src/remote_attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ fn create_system_path(file_name: &str) -> String {
info!("create_system_path:: file_name={}", &file_name);
let default_path = format!("{}{}", OS_SYSTEM_PATH, file_name);

let full_path = find_library_by_name(file_name).unwrap_or_else(|| default_path);
let full_path = find_library_by_name(file_name).unwrap_or(default_path);

let c_terminated_path = format!("{}{}", full_path, C_STRING_ENDING);
info!("create_system_path:: created path={}", &c_terminated_path);
Expand All @@ -668,9 +668,9 @@ fn find_library_by_name(lib_name: &str) -> Option<String> {
.map(|lib_name_and_path| {
lib_name_and_path
.rsplit_once("=>")
.and_then(|(_, lib_path)| Some(lib_path.trim().to_owned()))
.map(|(_, lib_path)| lib_path.trim().to_owned())
})
.nth(0)?;
.next()?;

possible_path
}
Expand Down

0 comments on commit 02de806

Please sign in to comment.