Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Willem Wyndham <[email protected]>
  • Loading branch information
elizabethengelman and willemneal authored Mar 6, 2024
1 parent 696274f commit c68cf99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/soroban-cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ mod build_helper {
}

fn get_example_contracts() -> Result<String, Error> {
if file_exists(cached_example_contracts_file_path().to_str().unwrap()) {
if file_exists(&cached_example_contracts_file_path().unwrap()) {
let example_contracts = std::fs::read_to_string(cached_example_contracts_file_path())?;
return Ok(example_contracts);
}
Expand Down Expand Up @@ -115,7 +115,7 @@ mod build_helper {
Ok(())
}

fn file_exists(file_path: &str) -> bool {
fn file_exists(file_path: &Path) -> bool {
if let Ok(metadata) = metadata(file_path) {
metadata.is_file()
} else {
Expand Down

0 comments on commit c68cf99

Please sign in to comment.