Skip to content

Commit ac06f3e

Browse files
committed
Fmt and fix the test
1 parent eb00a97 commit ac06f3e

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/bin/rustup-init.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use rustup::cli::setup_mode;
2828
use rustup::currentprocess::{process, with, OSProcess};
2929
use rustup::env_var::RUST_RECURSION_COUNT_MAX;
3030
use rustup::utils::utils;
31-
use rustup::{TOOLS, DUP_TOOLS};
31+
use rustup::{DUP_TOOLS, TOOLS};
3232

3333
fn main() {
3434
let process = OSProcess::default();
@@ -94,7 +94,12 @@ fn run_rustup_inner() -> Result<utils::ExitCode> {
9494
}
9595
}
9696
Some(n) => {
97-
if TOOLS.iter().chain(DUP_TOOLS.iter()).find(|&&name| name == n).is_some() {
97+
if TOOLS
98+
.iter()
99+
.chain(DUP_TOOLS.iter())
100+
.find(|&&name| name == n)
101+
.is_some()
102+
{
98103
proxy_mode::main()
99104
} else {
100105
Err(ErrorKind::UnknownProxyName(n.to_string()).into())

src/cli/errors.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use strsim::damerau_levenshtein;
1313

1414
use super::rustup_mode::CompletionCommand;
1515
use crate::dist::temp;
16-
use crate::{TOOLS, DUP_TOOLS};
16+
use crate::{DUP_TOOLS, TOOLS};
1717

1818
error_chain! {
1919
links {
@@ -85,7 +85,8 @@ error_chain! {
8585

8686
fn valid_proxy_names() -> String {
8787
TOOLS
88-
.iter().chain(DUP_TOOLS.iter())
88+
.iter()
89+
.chain(DUP_TOOLS.iter())
8990
.map(|s| format!("'{}'", s))
9091
.collect::<Vec<_>>()
9192
.join(", ")

tests/cli-misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fn rustup_failed_path_search() {
325325
expect_err(
326326
config,
327327
broken,
328-
&format!("unknown proxy name: 'fake_proxy'; valid proxy names are 'rustc', 'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rls', 'cargo-clippy', 'clippy-driver', 'cargo-miri'",),
328+
&format!("unknown proxy name: 'fake_proxy'; valid proxy names are 'rustc', 'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rls', 'cargo-clippy', 'clippy-driver', 'cargo-miri', 'rustfmt', 'cargo-fmt'",),
329329
);
330330

331331
// Hardlink will be automatically cleaned up by test setup code

0 commit comments

Comments
 (0)