Skip to content

Commit aa33b3a

Browse files
committed
feat: rm unnecessary line divider
1 parent 4a48773 commit aa33b3a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,13 @@ async fn main() -> Result<()> {
156156
_ => "Invalid usage, follow '--help' for more information".to_owned()
157157
};
158158

159-
print!("{}", output);
159+
if output.ends_with("\n\n") {
160+
print!("{}", &output[..output.len() - 1]);
161+
} else if output.ends_with('\n') {
162+
print!("{}", output);
163+
} else {
164+
println!("{}", output);
165+
}
160166

161167
().into_ok()
162168
}

0 commit comments

Comments
 (0)