Skip to content

Commit cec8cbb

Browse files
committed
cargo fmt
1 parent b14faa4 commit cec8cbb

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/rustup-dist/src/errors.rs

+12-13
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ use std::io::{self, Write};
55
use std::path::PathBuf;
66
use toml;
77

8-
pub const TOOLSTATE_MSG: &str = "if you require these components, please install and use the latest successful build version, \
9-
which you can find at https://rust-lang-nursery.github.io/rust-toolstate, for example.\n\
10-
rustup install nightly-2018-12-27";
8+
pub const TOOLSTATE_MSG: &str =
9+
"if you require these components, please install and use the latest successful build version, \
10+
which you can find at https://rust-lang-nursery.github.io/rust-toolstate, for example.\n\
11+
rustup install nightly-2018-12-27";
1112

1213
error_chain! {
1314
links {
@@ -132,20 +133,18 @@ fn component_unavailable_msg(cs: &[Component], manifest: &Manifest) -> String {
132133
let mut cs_strs = cs.iter().map(|c| format!("'{}'", c.short_name(manifest)));
133134
let cs_str = cs_strs.join(", ");
134135
let _ = write!(
135-
buf,
136-
"some components unavailable for download: {}\n{}",
137-
cs_str,
138-
TOOLSTATE_MSG,
139-
);
136+
buf,
137+
"some components unavailable for download: {}\n{}",
138+
cs_str, TOOLSTATE_MSG,
139+
);
140140
} else {
141141
let mut cs_strs = cs.iter().map(|c| c.description(manifest));
142142
let cs_str = cs_strs.join(", ");
143143
let _ = write!(
144-
buf,
145-
"some components unavailable for download: {}\n{}",
146-
cs_str,
147-
TOOLSTATE_MSG,
148-
);
144+
buf,
145+
"some components unavailable for download: {}\n{}",
146+
cs_str, TOOLSTATE_MSG,
147+
);
149148
}
150149
}
151150

tests/cli-misc.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ extern crate rustup_utils;
77
extern crate tempdir;
88
extern crate time;
99

10+
use rustup_dist::errors::TOOLSTATE_MSG;
1011
use rustup_mock::clitools::{
1112
self, expect_err, expect_ok, expect_ok_ex, expect_stderr_ok, expect_stdout_ok,
1213
expect_timeout_ok, run, set_current_dist_date, this_host_triple, Config, Scenario,
1314
};
1415
use rustup_utils::{raw, utils};
15-
use rustup_dist::errors::{TOOLSTATE_MSG};
1616

1717
use std::env::consts::EXE_SUFFIX;
1818
use std::ops::Add;
@@ -812,7 +812,8 @@ fn update_unavailable_rustc() {
812812
format!(
813813
"some components unavailable for download: 'rustc', 'cargo'\n{}",
814814
TOOLSTATE_MSG
815-
).as_str(),
815+
)
816+
.as_str(),
816817
);
817818

818819
expect_stdout_ok(config, &["rustc", "--version"], "hash-n-1");

0 commit comments

Comments
 (0)