Skip to content

Commit f256759

Browse files
djcrami3l
andcommitted
Rename currentprocess to process
Co-authored-by: rami3l <rami3l@outlook.com>
1 parent d327554 commit f256759

35 files changed

+51
-51
lines changed

doc/dev-guide/src/coding-standards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ order. Any file that is not grouped like this can be rearranged whenever the
2020
file is touched - we're not precious about having it done in a separate commit,
2121
though that is helpful.
2222

23-
## No direct use of process state outside rustup::currentprocess
23+
## No direct use of process state outside rustup::process
2424

25-
The `rustup::currentprocess` module abstracts the global state that is
25+
The `rustup::process` module abstracts the global state that is
2626
`std::env::args`, `std::env::vars`, `std::io::std*`, `std::process::id`,
2727
`std::env::current_dir` and `std::process::exit` permitting threaded tests of
2828
the CLI logic; use `process()` rather than those APIs directly.

src/bin/rustup-init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ use rustup::cli::rustup_mode;
2929
#[cfg(windows)]
3030
use rustup::cli::self_update;
3131
use rustup::cli::setup_mode;
32-
use rustup::currentprocess::Process;
3332
use rustup::env_var::RUST_RECURSION_COUNT_MAX;
3433
use rustup::errors::RustupError;
3534
use rustup::is_proxyable_tools;
35+
use rustup::process::Process;
3636
use rustup::utils::utils;
3737

3838
#[tokio::main]

src/cli/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ use tracing::{debug, error, info, trace, warn};
1515

1616
use super::self_update;
1717
use crate::cli::download_tracker::DownloadTracker;
18-
use crate::currentprocess::{terminalsource, Process};
1918
use crate::dist::{
2019
manifest::ComponentStatus, notifications as dist_notifications, TargetTriple, ToolchainDesc,
2120
};
2221
use crate::install::UpdateStatus;
22+
use crate::process::{terminalsource, Process};
2323
use crate::toolchain::{DistributableToolchain, LocalToolchainName, Toolchain, ToolchainName};
2424
use crate::utils::notifications as util_notifications;
2525
use crate::utils::notify::NotificationLevel;

src/cli/download_tracker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use std::fmt;
33
use std::io::Write;
44
use std::time::{Duration, Instant};
55

6-
use crate::currentprocess::{terminalsource, Process};
76
use crate::dist::Notification as In;
87
use crate::notifications::Notification;
8+
use crate::process::{terminalsource, Process};
99
use crate::utils::units::{Size, Unit, UnitMode};
1010
use crate::utils::Notification as Un;
1111

src/cli/log.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use tracing_subscriber::{
1414
reload, EnvFilter, Layer, Registry,
1515
};
1616

17-
use crate::{currentprocess::Process, utils::notify::NotificationLevel};
17+
use crate::{process::Process, utils::notify::NotificationLevel};
1818

1919
pub fn tracing_subscriber(
2020
process: &Process,

src/cli/markdown.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::io::Write;
33

44
use pulldown_cmark::{Event, Tag, TagEnd};
55

6-
use crate::currentprocess::terminalsource::{Attr, Color, ColorableTerminal};
6+
use crate::process::terminalsource::{Attr, Color, ColorableTerminal};
77

88
// Handles the wrapping of text written to the console
99
struct LineWrapper<'a> {

src/cli/proxy_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use anyhow::Result;
55
use crate::{
66
cli::{common::set_globals, job, self_update},
77
command::run_command_for_dir,
8-
currentprocess::Process,
8+
process::Process,
99
toolchain::ResolvableLocalToolchainName,
1010
};
1111

src/cli/rustup_mode.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ use crate::{
2121
},
2222
command,
2323
config::{ActiveReason, Cfg},
24-
currentprocess::{
25-
terminalsource::{self, ColorableTerminal},
26-
Process,
27-
},
2824
dist::{
2925
manifest::{Component, ComponentStatus},
3026
PartialToolchainDesc, Profile, TargetTriple,
3127
},
3228
errors::RustupError,
3329
install::{InstallMethod, UpdateStatus},
30+
process::{
31+
terminalsource::{self, ColorableTerminal},
32+
Process,
33+
},
3434
toolchain::{
3535
CustomToolchainName, DistributableToolchain, LocalToolchainName,
3636
MaybeResolvableToolchainName, ResolvableLocalToolchainName, ResolvableToolchainName,

src/cli/self_update.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ use crate::{
5555
markdown::md,
5656
},
5757
config::Cfg,
58-
currentprocess::{terminalsource, Process},
5958
dist::{self, PartialToolchainDesc, Profile, TargetTriple, ToolchainDesc},
6059
errors::RustupError,
6160
install::UpdateStatus,
61+
process::{terminalsource, Process},
6262
toolchain::{
6363
DistributableToolchain, MaybeOfficialToolchainName, ResolvableToolchainName, Toolchain,
6464
ToolchainName,
@@ -1257,7 +1257,7 @@ mod tests {
12571257
use crate::cli::self_update::InstallOpts;
12581258
use crate::dist::{PartialToolchainDesc, Profile};
12591259
use crate::test::{test_dir, with_rustup_home, Env};
1260-
use crate::{currentprocess::TestProcess, for_host};
1260+
use crate::{for_host, process::TestProcess};
12611261

12621262
#[test]
12631263
fn default_toolchain_is_stable() {

src/cli/self_update/shell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use std::path::PathBuf;
2929
use anyhow::{bail, Result};
3030

3131
use super::utils;
32-
use crate::currentprocess::Process;
32+
use crate::process::Process;
3333

3434
pub(crate) type Shell = Box<dyn UnixShell>;
3535

0 commit comments

Comments
 (0)