Unverified Commit d99a0dbb authored by Zelda Hessler's avatar Zelda Hessler Committed by GitHub
Browse files

fix: use new version of deprecated fn (#1994)

update: crate-hasher sha256 dep to 1.1
parent c187e3d5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -500,9 +500,9 @@ dependencies = [

[[package]]
name = "sha256"
version = "1.0.3"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e84a7f596c081d359de5e06a83877138bc3c4483591e1af1916e1472e6e146e"
checksum = "e334db67871c14c18fc066ad14af13f9fdf5f9a91c61af432d1e3a39c8c6a141"
dependencies = [
    "hex",
    "sha2",
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ opt-level = 0
anyhow = "1.0"
clap = { version = "~3.1.18", features = ["derive"] }
ignore = "0.4"
sha256 = "1.0"
sha256 = "1.1"

[dev-dependencies]
flate2 = "1.0"
+3 −2
Original line number Diff line number Diff line
@@ -3,12 +3,13 @@
 * SPDX-License-Identifier: Apache-2.0
 */

use anyhow::{Context, Result};
use std::collections::BTreeSet;
use std::fmt::Write;
use std::fs::Metadata;
use std::path::Path;

use anyhow::{Context, Result};

#[derive(Debug, Default)]
pub struct FileList(BTreeSet<FileMetadata>);

@@ -64,7 +65,7 @@ impl FileList {
                        .to_str()
                        .expect("not using unusual file names in crate source")
                        .into(),
                    sha256: sha256::digest_file(&path).context("hash file")?,
                    sha256: sha256::try_digest(path).context("hash file")?,
                });
            }
        }