History

Merge branch 'dependabot/cargo/crc-2.0.0'

Sebastian Thiel committed 5 years ago

Commit 683c44d2 parents 3286e42 48fa9bc3 files · +15 −17Browse files

Unified · Split

3 files
  1. Cargo.lock +9 −9
  2. tests/tools/Cargo.toml +1 −1
  3. tests/tools/src/lib.rs +5 −7
Cargo.lock+9−9
@@ -293,12 +293,6 @@ dependencies = [ · 292 unmodified lines
293293 "num-traits",
294294 ]
295295
296−[[package]]
297−name = "build_const"
298−version = "0.2.2"
299−source = "registry+https://github.com/rust-lang/crates.io-index"
300−checksum = "b4ae4235e6dac0694637c763029ecea1a2ec9e4e06ec2729bd21ba4d9c863eb7"
301−
302296 [[package]]
303297 name = "bumpalo"
304298 version = "3.7.0"
@@ -454,13 +448,19 @@ dependencies = [ · 149 unmodified lines
454448
455449 [[package]]
456450 name = "crc"
457−version = "1.8.1"
451+version = "2.0.0"
458452 source = "registry+https://github.com/rust-lang/crates.io-index"
459−checksum = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb"
453+checksum = "10c2722795460108a7872e1cd933a85d6ec38abc4baecad51028f702da28889f"
460454 dependencies = [
461− "build_const",
455+ "crc-catalog",
462456 ]
463457
458+[[package]]
459+name = "crc-catalog"
460+version = "1.1.1"
461+source = "registry+https://github.com/rust-lang/crates.io-index"
462+checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403"
463+
464464 [[package]]
465465 name = "crc32fast"
466466 version = "1.2.1"
tests/tools/Cargo.toml+1−1
@@ -15,6 +15,6 @@ path = "src/main.rs" · 14 unmodified lines
1515 [dependencies]
1616 git-hash = { version = "^0.4.0", path = "../../git-hash" }
1717 bstr = "0.2.15"
18−crc = "1.8.1"
18+crc = "2.0.0"
1919 once_cell = "1.7.2"
2020 tempfile = "3.2.0"
tests/tools/src/lib.rs+5−7
@@ -31,15 +31,13 @@ pub fn scripted_fixture_repo_read_only_with_args( · 30 unmodified lines
3131 let script_identity = map
3232 .entry(args.iter().fold(script_path.clone(), |p, a| p.join(a)))
3333 .or_insert_with(|| {
34− let mut crc_value = crc::crc32::update(
35− 0,
36− &crc::crc32::IEEE_TABLE,
37− &std::fs::read(&script_path).expect("file can be read entirely"),
38− );
34+ let crc_value = crc::Crc::<u32>::new(&crc::CRC_32_CKSUM);
35+ let mut crc_digest = crc_value.digest();
36+ crc_digest.update(&std::fs::read(&script_path).expect("file can be read entirely"));
3937 for arg in args.iter() {
40− crc_value = crc::crc32::update(crc_value, &crc::crc32::IEEE_TABLE, arg.as_bytes());
38+ crc_digest.update(arg.as_bytes());
4139 }
42− crc_value
40+ crc_digest.finalize()
4341 })
4442 .to_owned();
4543 let script_result_directory = fixture_path(