pub fn generate_hash(filepath: &str) -> std::string::String {
    let file = fs::read(filepath).expect("Unable to read file");
    // Assume a valid UTF-8 file
    let content = str::from_utf8(&file).unwrap();

    let store = create_store(content);
    Sha1::from(store.as_bytes()).hexdigest()
}
/// Returns the SHA1 hash of the passed file.
Returns the SHA1 hash of the passed file.
Returns the SHA1 hash of the passed file .
pub fn generate_hash(filepath: &str) -> std::string::String {
    let file = fs::read(filepath).expect("Unable to read file");
    // Assume a valid UTF-8 file
    let content = str::from_utf8(&file).unwrap();
    let store = create_store(content);
    Sha1::from(store.as_bytes()).hexdigest()
}
pub fn generate_hash ( filepath : & str ) -> std :: string :: String { let file = fs :: read ( filepath ) . expect ( " " ) ; // Assume a valid UTF-8 file let content = str :: from_utf8 ( & file ) . unwrap ( ) ; let store = create_store ( content ) ; Sha1 :: from ( store . as_bytes ( ) ) . hexdigest ( ) }
Returns the SHA1 hash of the passed file.
Returns the SHA1 hash of the passed file .
filepath
&str
filepath
&str