Skip to content

Commit

Permalink
feat: rm unnecessary line divider
Browse files Browse the repository at this point in the history
  • Loading branch information
Thaumy committed Sep 25, 2023
1 parent 4a48773 commit aa33b3a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ async fn main() -> Result<()> {
_ => "Invalid usage, follow '--help' for more information".to_owned()
};

print!("{}", output);
if output.ends_with("\n\n") {
print!("{}", &output[..output.len() - 1]);
} else if output.ends_with('\n') {
print!("{}", output);
} else {
println!("{}", output);
}

().into_ok()
}

0 comments on commit aa33b3a

Please sign in to comment.