fn cached_results_path(input_path: &Path, key: &str, hash: HashCode) -> PathBuf {
    //There is no need to preseve the entire input path.  If the hashes match then they have the
    //same content; we include the file name of the input path only to aid in debugging
    let input_with_hash = add_hash_to_path(input_path, hash);
    let input_name = input_with_hash
        .file_name()
        .expect("Input path is missing a file name");

    PathBuf::from(input_name).join(format!("{}.json", key))
}
/// Compute the path of the directory within the cache path which contains all results related to a
/// specific input path and hash.
Compute the path of the directory within the cache path which contains all results related to a
specific input path and hash.
Compute the path of the directory within the cache path which contains all results related to a specific input path and hash .
fn cached_results_path(input_path: &Path, key: &str, hash: HashCode) -> PathBuf {
    //There is no need to preseve the entire input path.  If the hashes match then they have the
    //same content; we include the file name of the input path only to aid in debugging
    let input_with_hash = add_hash_to_path(input_path, hash);
    let input_name = input_with_hash
        .file_name()
        .expect("Input path is missing a file name");
    PathBuf::from(input_name).join(format!("{}.json", key))
}
fn cached_results_path ( input_path : & Path , key : & str , hash : HashCode ) -> PathBuf { //There is no need to preseve the entire input path.  If the hashes match then they have the //same content; we include the file name of the input path only to aid in debugging let input_with_hash = add_hash_to_path ( input_path , hash ) ; let input_name = input_with_hash . file_name ( ) . expect ( " " ) ; PathBuf :: from ( input_name ) . join ( format ! ( " " key ) ) }
Compute the path of the directory within the cache path which contains all results related to a
specific input path and hash.
Compute the path of the directory within the cache path which contains all results related to a specific input path and hash .
input_path
&Path
key
&str
hash
HashCode
input_path
&Path
key
&str
hash
HashCode