Skip to content

Commit c6143f0

Browse files
committed
push the tags problem into the future
1 parent 35e62df commit c6143f0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/tags.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,14 @@ pub fn get_all(args: Args) -> Result<()> {
8585
api::send_reply(&args, "No tags found")?;
8686
} else {
8787
let tags = &results.iter().fold(String::new(), |prev, row| {
88-
prev + &row.1 + ": " + &row.2 + "\n"
88+
if prev.len() < 1980 {
89+
prev + &row.1 + "\n"
90+
} else {
91+
prev
92+
}
8993
});
9094

91-
api::send_reply(&args, &format!("\n{}", &tags))?;
95+
api::send_reply(&args, &format!("All tags: ```\n{}```", &tags))?;
9296
}
9397

9498
Ok(())

0 commit comments

Comments
 (0)