Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
- Make 'you can use x.py' less definitive, since we don't know if the
toolchain was installed from source
- format! -> to_string()

Note that this still re-orders imports because rustfmt really wants them
to change.
  • Loading branch information
jyn514 committed Sep 15, 2020
1 parent 2a6b4c9 commit 3684347
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ fn component_unavailable_msg(cs: &[Component], manifest: &Manifest, toolchain: &

fn install_msg(bin: &str, toolchain: &str, is_default: bool) -> String {
if Toolchain::is_custom_name(toolchain) {
return format!("\nnote: this is a custom toolchain, which cannot use `rustup component add`\n\
help: if you installed this toolchain from source with `rustup component link`, you can build the component with `x.py`");
return "\nnote: this is a custom toolchain, which cannot use `rustup component add`\n\
help: if you built this toolchain from source, and used `rustup component link`, then you may be able to build the component with `x.py`".to_string();
}
match component_for_bin(bin) {
Some(c) => format!("\nTo install, run `rustup component add {}{}`", c, {
Expand Down

0 comments on commit 3684347

Please sign in to comment.