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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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 = ""

0 commit comments

Comments
 (0)