Skip to content

Commit 6f747de

Browse files
committed
improve misc module
Signed-off-by: onur-ozkan <[email protected]>
1 parent 7db7c24 commit 6f747de

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/bootstrap/src/flags.rs renamed to src/bootstrap/src/misc/flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use clap::{CommandFactory, Parser, ValueEnum};
99

1010
use crate::builder::{Builder, Kind};
1111
use crate::config::{target_selection_list, Config, TargetSelectionList};
12-
use crate::setup::Profile;
12+
use crate::commands::setup::Profile;
1313
use crate::{Build, DocTests};
1414

1515
#[derive(Copy, Clone, Default, Debug, ValueEnum)]
File renamed without changes.

src/bootstrap/src/tarball.rs renamed to src/bootstrap/src/misc/tarball.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::{
66
use crate::builder::Builder;
77
use crate::misc::channel;
88
use crate::util::t;
9+
use crate::commands::dist::distdir;
910

1011
#[derive(Copy, Clone)]
1112
pub(crate) enum OverlayKind {
@@ -112,7 +113,7 @@ impl<'a> Tarball<'a> {
112113
}
113114

114115
fn new_inner(builder: &'a Builder<'a>, component: &str, target: Option<String>) -> Self {
115-
let pkgname = crate::dist::pkgname(builder, component);
116+
let pkgname = crate::commands::dist::pkgname(builder, component);
116117

117118
let mut temp_dir = builder.out.join("tmp").join("tarball").join(component);
118119
if let Some(target) = &target {
@@ -265,7 +266,7 @@ impl<'a> Tarball<'a> {
265266
t!(std::fs::rename(&self.image_dir, &dest));
266267

267268
self.run(|this, cmd| {
268-
let distdir = crate::dist::distdir(this.builder);
269+
let distdir = distdir(this.builder);
269270
t!(std::fs::create_dir_all(&distdir));
270271
cmd.arg("tarball")
271272
.arg("--input")
@@ -292,7 +293,7 @@ impl<'a> Tarball<'a> {
292293
.arg("--non-installed-overlay")
293294
.arg(&self.overlay_dir)
294295
.arg("--output-dir")
295-
.arg(crate::dist::distdir(self.builder));
296+
.arg(distdir(self.builder));
296297
}
297298

298299
fn run(self, build_cli: impl FnOnce(&Tarball<'a>, &mut Command)) -> GeneratedTarball {
@@ -344,7 +345,7 @@ impl<'a> Tarball<'a> {
344345
.unwrap_or("gz");
345346

346347
GeneratedTarball {
347-
path: crate::dist::distdir(self.builder).join(format!("{package_name}.tar.{ext}")),
348+
path: distdir(self.builder).join(format!("{package_name}.tar.{ext}")),
348349
decompressed_output,
349350
work: self.temp_dir,
350351
}

0 commit comments

Comments
 (0)