Skip to content

Commit

Permalink
move stage0 config closer to Config
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Jun 13, 2022
1 parent c20541f commit d3b1532
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,28 @@ pub struct Config {
pub out: PathBuf,
}

#[derive(Default, Deserialize)]
#[cfg_attr(test, derive(Clone))]
pub struct Stage0Metadata {
pub config: Stage0Config,
pub checksums_sha256: HashMap<String, String>,
pub rustfmt: Option<RustfmtMetadata>,
}
#[derive(Default, Deserialize)]
#[cfg_attr(test, derive(Clone))]
pub struct Stage0Config {
pub dist_server: String,
pub artifacts_server: String,
pub artifacts_with_llvm_assertions_server: String,
pub git_merge_commit_email: String,
}
#[derive(Default, Deserialize)]
#[cfg_attr(test, derive(Clone))]
pub struct RustfmtMetadata {
pub date: String,
pub version: String,
}

#[derive(Clone, Debug)]
pub enum RustfmtState {
SystemToolchain(PathBuf),
Expand Down Expand Up @@ -720,28 +742,6 @@ define_config! {
}
}

#[derive(Default, Deserialize)]
#[cfg_attr(test, derive(Clone))]
pub struct Stage0Metadata {
pub config: Stage0Config,
pub checksums_sha256: HashMap<String, String>,
pub rustfmt: Option<RustfmtMetadata>,
}
#[derive(Default, Deserialize)]
#[cfg_attr(test, derive(Clone))]
pub struct Stage0Config {
pub dist_server: String,
pub artifacts_server: String,
pub artifacts_with_llvm_assertions_server: String,
pub git_merge_commit_email: String,
}
#[derive(Default, Deserialize)]
#[cfg_attr(test, derive(Clone))]
pub struct RustfmtMetadata {
pub date: String,
pub version: String,
}

impl Config {
pub fn default_opts() -> Config {
let mut config = Config::default();
Expand Down

0 comments on commit d3b1532

Please sign in to comment.