mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
disregard what we believe is supported in cargo for hash type
This commit is contained in:
parent
6ff7a3e2aa
commit
081661b78d
@ -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;
|
||||
}
|
||||
}
|
||||
_ => return false,
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user