Skip to content

Commit

Permalink
refactor(cache): pass sources by value
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel Nützi <[email protected]>
  • Loading branch information
cmdoret and gabyx authored Oct 22, 2024
1 parent 5bb08df commit a7d94e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fuzon/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ pub fn get_file_stamp(path: &str) -> Result<String> {
/// Generate a fixed cache key based on a collection of source paths.
/// Each path is converted to a stamp in the format "{path}-{fingerprint}-{modified-date}".
/// Stamps are then concatenated and hash of this concatenation is returned.
pub fn get_cache_key(sources: &Vec<&str>) -> Result<String> {
let mut paths = sources.clone();
pub fn get_cache_key(paths: Vec<&str>) -> Result<String> {
paths.sort();

// Craft all stamps and concatenate them
Expand Down

0 comments on commit a7d94e0

Please sign in to comment.