Skip to content

Commit

Permalink
Increase limit of hash_url
Browse files Browse the repository at this point in the history
  • Loading branch information
fschutt committed Dec 12, 2022
1 parent 8bf5419 commit f093658
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/registry/src/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ impl Package {
Some(checkouts_dir.join(found))
}

/// Returns the hash of the URL with a maximum of 64 bytes length
/// Returns the hash of the URL with a maximum of 128 bytes length
/// (necessary for not erroring on filesystem limitations)
pub fn hash_url(url: &str) -> String {
hex::encode(url).chars().take(64).collect()
hex::encode(url).chars().take(128).collect()
}

/// Returns the hash of the URL with a maximum of 64 bytes length
Expand Down

0 comments on commit f093658

Please sign in to comment.