Skip to content

Commit

Permalink
disregard what we believe is supported in cargo for hash type
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaeroxe committed Oct 2, 2024
1 parent 6ff7a3e commit 081661b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
6 changes: 1 addition & 5 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1295,11 +1295,7 @@ mod parse {
) -> bool {
match v.and_then(|s| SourceFileHashAlgorithm::from_str(s).ok()) {
Some(hash_kind) => {
if hash_kind.supported_in_cargo() {
*slot = Some(hash_kind);
} else {
return false;
}
*slot = Some(hash_kind);
}
_ => return false,
}
Expand Down
9 changes: 0 additions & 9 deletions compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1400,15 +1400,6 @@ pub enum SourceFileHashAlgorithm {
Blake3,
}

impl SourceFileHashAlgorithm {
pub fn supported_in_cargo(&self) -> bool {
match self {
Self::Md5 | Self::Sha1 => false,
Self::Sha256 | Self::Blake3 => true,
}
}
}

impl Display for SourceFileHashAlgorithm {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(match self {
Expand Down

0 comments on commit 081661b

Please sign in to comment.