build-manifest: add documentation on the PkgType methods
This commit is contained in:
parent
89ffab76b7
commit
73d9c24b3e
1 changed files with 5 additions and 0 deletions
|
|
@ -38,6 +38,8 @@ impl PkgType {
|
|||
}
|
||||
}
|
||||
|
||||
/// The directory containing the `Cargo.toml` of this component inside the monorepo, to
|
||||
/// retrieve the source code version. If `None` is returned Rust's version will be used.
|
||||
fn rust_monorepo_path(&self) -> Option<&'static str> {
|
||||
match self {
|
||||
PkgType::Cargo => Some("src/tools/cargo"),
|
||||
|
|
@ -53,6 +55,7 @@ impl PkgType {
|
|||
}
|
||||
}
|
||||
|
||||
/// First part of the tarball name.
|
||||
fn tarball_component_name(&self) -> &str {
|
||||
match self {
|
||||
PkgType::Rust => "rust",
|
||||
|
|
@ -68,6 +71,8 @@ impl PkgType {
|
|||
}
|
||||
}
|
||||
|
||||
/// Whether this package has the same version as Rust itself, or has its own `version` and
|
||||
/// `git-commit-hash` files inside the tarball.
|
||||
fn should_use_rust_version(&self) -> bool {
|
||||
match self {
|
||||
PkgType::Cargo => false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue