Skip to content

Commit 665d9a0

Browse files
committed
refactor: inline make_dep_prefix
It is not used anywhere other than in module `registry::download`.
1 parent 768708f commit 665d9a0

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/cargo/sources/registry/download.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
//! [`RemoteRegistry`]: super::remote::RemoteRegistry
55
66
use anyhow::Context;
7+
use cargo_util::registry::make_dep_path;
78
use cargo_util::Sha256;
89

910
use crate::core::PackageId;
10-
use crate::sources::registry::make_dep_prefix;
1111
use crate::sources::registry::MaybeLock;
1212
use crate::sources::registry::RegistryConfig;
1313
use crate::util::auth;
@@ -68,7 +68,7 @@ pub(super) fn download(
6868
)
6969
.unwrap();
7070
} else {
71-
let prefix = make_dep_prefix(&*pkg.name());
71+
let prefix = make_dep_path(&pkg.name(), true);
7272
url = url
7373
.replace(CRATE_TEMPLATE, &*pkg.name())
7474
.replace(VERSION_TEMPLATE, &pkg.version().to_string())

src/cargo/sources/registry/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -903,9 +903,3 @@ fn max_unpack_size(config: &Config, size: u64) -> u64 {
903903

904904
u64::max(max_unpack_size, size * max_compression_ratio as u64)
905905
}
906-
907-
/// Constructs a path to a dependency in the registry index on filesystem.
908-
/// See [`cargo_util::registry::make_dep_path`] for more.
909-
fn make_dep_prefix(name: &str) -> String {
910-
cargo_util::registry::make_dep_path(name, true)
911-
}

0 commit comments

Comments
 (0)