diff --git a/crates/cargo-test-support/src/registry.rs b/crates/cargo-test-support/src/registry.rs index 228af17cf693..3926e6da0141 100644 --- a/crates/cargo-test-support/src/registry.rs +++ b/crates/cargo-test-support/src/registry.rs @@ -866,16 +866,8 @@ impl Package { self } - /// Call with `true` to publish a git dependency in a "local registry". - /// - /// The difference between this and [Package::local] is that this will - /// skip checksum generation as git dependencies do not have checksums. - /// - /// See `source-replacement.html#local-registry-sources` for more details - /// on local registries. See `local_registry.rs` for the tests that use - /// this. - pub fn local_from_git(&mut self, local: bool) -> &mut Package { - self.local = local; + /// Call with `true` to prevent a checksum being generated for the package. + pub fn skip_checksum(&mut self, local: bool) -> &mut Package { self.generate_checksum = !local; self } diff --git a/tests/testsuite/local_registry.rs b/tests/testsuite/local_registry.rs index 2add32fd408d..3c488fb05fe7 100644 --- a/tests/testsuite/local_registry.rs +++ b/tests/testsuite/local_registry.rs @@ -563,7 +563,8 @@ fn git_dependencies_do_not_require_a_checksum() { t!(fs::create_dir(&root.join(".cargo"))); Package::new("bar", "0.0.1") - .local_from_git(true) + .local(true) + .skip_checksum(true) .file("src/lib.rs", "pub fn bar() {}") .publish();