From c68cf996050bfae37e3bcba47b36a197c69df713 Mon Sep 17 00:00:00 2001 From: Elizabeth Engelman <4752801+elizabethengelman@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:58:24 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Willem Wyndham --- cmd/soroban-cli/build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/soroban-cli/build.rs b/cmd/soroban-cli/build.rs index 4dd731fbe..065be9021 100644 --- a/cmd/soroban-cli/build.rs +++ b/cmd/soroban-cli/build.rs @@ -41,7 +41,7 @@ mod build_helper { } fn get_example_contracts() -> Result { - 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); } @@ -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 {