Skip to content

Commit dae8b6a

Browse files
committed
Remove extra new line after help
1 parent 795f9ef commit dae8b6a

File tree

48 files changed

+4
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4
-50
lines changed

rustup-init.sh

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ OPTIONS:
6767
6868
-V, --version
6969
Print version information
70-
7170
EOF
7271
}
7372

src/cli/rustup_mode.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ pub fn main() -> Result<utils::ExitCode> {
7171
let matches = match cli().try_get_matches_from(process().args_os()) {
7272
Ok(matches) => Ok(matches),
7373
Err(err) if err.kind() == DisplayHelp => {
74-
writeln!(process().stdout().lock(), "{err}")?;
74+
write!(process().stdout().lock(), "{err}")?;
7575
return Ok(utils::ExitCode(0));
7676
}
7777
Err(err) if err.kind() == DisplayVersion => {
78-
writeln!(process().stdout().lock(), "{err}")?;
78+
write!(process().stdout().lock(), "{err}")?;
7979
info!("This is the version for the rustup toolchain manager, not the rustc compiler.");
8080

8181
fn rustc_version() -> std::result::Result<String, Box<dyn std::error::Error>> {
@@ -107,7 +107,7 @@ pub fn main() -> Result<utils::ExitCode> {
107107
]
108108
.contains(&err.kind())
109109
{
110-
writeln!(process().stdout().lock(), "{err}")?;
110+
write!(process().stdout().lock(), "{err}")?;
111111
return Ok(utils::ExitCode(1));
112112
}
113113
Err(err)

src/cli/setup_mode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub fn main() -> Result<utils::ExitCode> {
105105
if e.kind() == clap::ErrorKind::DisplayHelp
106106
|| e.kind() == clap::ErrorKind::DisplayVersion =>
107107
{
108-
writeln!(process().stdout().lock(), "{e}")?;
108+
write!(process().stdout().lock(), "{e}")?;
109109
return Ok(utils::ExitCode(0));
110110
}
111111
Err(e) => return Err(e.into()),

tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@ OPTIONS:
4444
4545
-V, --version
4646
Print version information
47-
4847
"""
4948
stderr = ""

tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@ OPTIONS:
4444
4545
-V, --version
4646
Print version information
47-
4847
"""
4948
stderr = ""

tests/suite/cli-ui/rustup/rustup_check_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ USAGE:
99
1010
OPTIONS:
1111
-h, --help Print help information
12-
1312
"""
1413
stderr = ""

tests/suite/cli-ui/rustup/rustup_completions_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,5 @@ ${env:USERPROFILE}/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
134134
ZSH:
135135
136136
$ rustup completions zsh cargo > ~/.zfunc/_cargo
137-
138137
"""
139138
stderr = ""

tests/suite/cli-ui/rustup/rustup_component_cmd_add_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ OPTIONS:
1515
information see `rustup help toolchain`
1616
--target <target>
1717
-h, --help Print help information
18-
1918
"""
2019
stderr = ""

tests/suite/cli-ui/rustup/rustup_component_cmd_list_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ OPTIONS:
1212
information see `rustup help toolchain`
1313
--installed List only installed components
1414
-h, --help Print help information
15-
1615
"""
1716
stderr = ""

tests/suite/cli-ui/rustup/rustup_component_cmd_remove_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ OPTIONS:
1515
information see `rustup help toolchain`
1616
--target <target>
1717
-h, --help Print help information
18-
1918
"""
2019
stderr = ""

tests/suite/cli-ui/rustup/rustup_default_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ OPTIONS:
1717
DISCUSSION:
1818
Sets the default toolchain to the one specified. If the toolchain
1919
is not already installed then it is installed first.
20-
2120
"""
2221
stderr = ""

tests/suite/cli-ui/rustup/rustup_doc_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,5 @@ DISCUSSION:
4141
4242
By default, it opens the documentation index. Use the various
4343
flags to open specific pieces of documentation.
44-
4544
"""
4645
stderr = ""

tests/suite/cli-ui/rustup/rustup_help_cmd_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@ DISCUSSION:
4444
4545
If you are new to Rust consider running `rustup doc --book` to
4646
learn Rust.
47-
4847
"""
4948
stderr = ""

tests/suite/cli-ui/rustup/rustup_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@ DISCUSSION:
4444
4545
If you are new to Rust consider running `rustup doc --book` to
4646
learn Rust.
47-
4847
"""
4948
stderr = ""

tests/suite/cli-ui/rustup/rustup_man_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ OPTIONS:
1414
--toolchain <toolchain> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more
1515
information see `rustup help toolchain`
1616
-h, --help Print help information
17-
1817
"""
1918
stderr = ""

tests/suite/cli-ui/rustup/rustup_override_cmd_add_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ ARGS:
1414
OPTIONS:
1515
--path <path> Path to the directory
1616
-h, --help Print help information
17-
1817
"""
1918
stderr = ""

tests/suite/cli-ui/rustup/rustup_override_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,5 @@ DISCUSSION:
3636
To see the active toolchain use `rustup show`. To remove the
3737
override and use the default toolchain again, `rustup override
3838
unset`.
39-
4039
"""
4140
stderr = ""

tests/suite/cli-ui/rustup/rustup_override_cmd_list_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ USAGE:
99
1010
OPTIONS:
1111
-h, --help Print help information
12-
1312
"""
1413
stderr = ""

tests/suite/cli-ui/rustup/rustup_override_cmd_remove_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ DISCUSSION:
1818
present, removes the override toolchain for all nonexistent
1919
directories. Otherwise, removes the override toolchain for the
2020
current directory.
21-
2221
"""
2322
stderr = ""

tests/suite/cli-ui/rustup/rustup_override_cmd_set_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ ARGS:
1414
OPTIONS:
1515
--path <path> Path to the directory
1616
-h, --help Print help information
17-
1817
"""
1918
stderr = ""

tests/suite/cli-ui/rustup/rustup_override_cmd_unset_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ DISCUSSION:
1818
present, removes the override toolchain for all nonexistent
1919
directories. Otherwise, removes the override toolchain for the
2020
current directory.
21-
2221
"""
2322
stderr = ""

tests/suite/cli-ui/rustup/rustup_run_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@ DISCUSSION:
3030
$ cargo +nightly build
3131
3232
$ rustup run nightly cargo build
33-
3433
"""
3534
stderr = ""

tests/suite/cli-ui/rustup/rustup_self_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ SUBCOMMANDS:
1515
uninstall Uninstall rustup.
1616
upgrade-data Upgrade the internal data format.
1717
help Print this message or the help of the given subcommand(s)
18-
1918
"""
2019
stderr = ""

tests/suite/cli-ui/rustup/rustup_self_cmd_uninstall_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ USAGE:
1010
OPTIONS:
1111
-y
1212
-h, --help Print help information
13-
1413
"""
1514
stderr = ""

tests/suite/cli-ui/rustup/rustup_self_cmd_update_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ USAGE:
99
1010
OPTIONS:
1111
-h, --help Print help information
12-
1312
"""
1413
stderr = ""

tests/suite/cli-ui/rustup/rustup_self_cmd_upgrade-data _cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ USAGE:
99
1010
OPTIONS:
1111
-h, --help Print help information
12-
1312
"""
1413
stderr = ""

tests/suite/cli-ui/rustup/rustup_set_cmd_auto-self-update_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ ARGS:
1212
1313
OPTIONS:
1414
-h, --help Print help information
15-
1615
"""
1716
stderr = ""

tests/suite/cli-ui/rustup/rustup_set_cmd_default-host_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ ARGS:
1212
1313
OPTIONS:
1414
-h, --help Print help information
15-
1615
"""
1716
stderr = ""

tests/suite/cli-ui/rustup/rustup_set_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ SUBCOMMANDS:
1515
profile The default components installed
1616
auto-self-update The rustup auto self update mode
1717
help Print this message or the help of the given subcommand(s)
18-
1918
"""
2019
stderr = ""

tests/suite/cli-ui/rustup/rustup_set_cmd_profile_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ ARGS:
1212
1313
OPTIONS:
1414
-h, --help Print help information
15-
1615
"""
1716
stderr = ""

tests/suite/cli-ui/rustup/rustup_show_cmd_active-toolchain_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ DISCUSSION:
1919
2020
You should use `rustc --print sysroot` to get the sysroot, or
2121
`rustc --version` to get the toolchain version.
22-
2322
"""
2423
stderr = ""

tests/suite/cli-ui/rustup/rustup_show_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ DISCUSSION:
2626
2727
If there are multiple toolchains installed then all installed
2828
toolchains are listed as well.
29-
3029
"""
3130
stderr = ""

tests/suite/cli-ui/rustup/rustup_show_cmd_home_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ USAGE:
99
1010
OPTIONS:
1111
-h, --help Print help information
12-
1312
"""
1413
stderr = ""

tests/suite/cli-ui/rustup/rustup_show_cmd_keys_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ USAGE:
99
1010
OPTIONS:
1111
-h, --help Print help information
12-
1312
"""
1413
stderr = ""

tests/suite/cli-ui/rustup/rustup_show_cmd_profile_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ USAGE:
99
1010
OPTIONS:
1111
-h, --help Print help information
12-
1312
"""
1413
stderr = ""

tests/suite/cli-ui/rustup/rustup_target_cmd_add_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ OPTIONS:
1414
--toolchain <toolchain> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more
1515
information see `rustup help toolchain`
1616
-h, --help Print help information
17-
1817
"""
1918
stderr = ""

tests/suite/cli-ui/rustup/rustup_target_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ SUBCOMMANDS:
1515
add Add a target to a Rust toolchain
1616
remove Remove a target from a Rust toolchain
1717
help Print this message or the help of the given subcommand(s)
18-
1918
"""
2019
stderr = ""

tests/suite/cli-ui/rustup/rustup_target_cmd_list_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ OPTIONS:
1212
information see `rustup help toolchain`
1313
--installed List only installed targets
1414
-h, --help Print help information
15-
1615
"""
1716
stderr = ""

tests/suite/cli-ui/rustup/rustup_target_cmd_remove_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ OPTIONS:
1414
--toolchain <toolchain> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more
1515
information see `rustup help toolchain`
1616
-h, --help Print help information
17-
1817
"""
1918
stderr = ""

tests/suite/cli-ui/rustup/rustup_toolchain_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,5 @@ DISCUSSION:
5858
rustup can also manage symlinked local toolchain builds, which are
5959
often used for developing Rust itself. For more information see
6060
`rustup toolchain help link`.
61-
6261
"""
6362
stderr = ""

tests/suite/cli-ui/rustup/rustup_toolchain_cmd_install_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ OPTIONS:
2323
--force-non-host Install toolchains that require an emulator. See
2424
https://github.com/rust-lang/rustup/wiki/Non-host-toolchains
2525
-h, --help Print help information
26-
2726
"""
2827
stderr = ""

tests/suite/cli-ui/rustup/rustup_toolchain_cmd_link_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,5 @@ DISCUSSION:
3232
3333
If you now compile a crate in the current directory, the custom
3434
toolchain 'latest-stage1' will be used.
35-
3635
"""
3736
stderr = ""

tests/suite/cli-ui/rustup/rustup_toolchain_cmd_list_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ USAGE:
1010
OPTIONS:
1111
-v, --verbose Enable verbose output with toolchain information
1212
-h, --help Print help information
13-
1413
"""
1514
stderr = ""

tests/suite/cli-ui/rustup/rustup_toolchain_cmd_uninstall_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ ARGS:
1313
1414
OPTIONS:
1515
-h, --help Print help information
16-
1716
"""
1817
stderr = ""

tests/suite/cli-ui/rustup/rustup_up_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ DISCUSSION:
2525
2626
If given a toolchain argument then `update` updates that
2727
toolchain, the same as `rustup toolchain install`.
28-
2928
"""
3029
stderr = ""

tests/suite/cli-ui/rustup/rustup_update_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ DISCUSSION:
2525
2626
If given a toolchain argument then `update` updates that
2727
toolchain, the same as `rustup toolchain install`.
28-
2928
"""
3029
stderr = ""

tests/suite/cli-ui/rustup/rustup_upgrade_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ DISCUSSION:
2525
2626
If given a toolchain argument then `update` updates that
2727
toolchain, the same as `rustup toolchain install`.
28-
2928
"""
3029
stderr = ""

tests/suite/cli-ui/rustup/rustup_which_cmd_help_flag_stdout.toml

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ OPTIONS:
1414
--toolchain <toolchain> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more
1515
information see `rustup help toolchain`
1616
-h, --help Print help information
17-
1817
"""
1918
stderr = ""

0 commit comments

Comments
 (0)