Skip to content

Commit 3e8e38c

Browse files
authored
Merge pull request #66 from tinaun/imma-fix-tags
push the tags problem into the future
2 parents e3bbb70 + b32efeb commit 3e8e38c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/playground.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ fn run_code(args: &Args, code: &str) -> Result<String> {
189189
get_playground_link(args, code, &request)?
190190
)
191191
} else if result.len() == 0 {
192-
format!("{}compilation succeded.", errors)
192+
format!("{}compilation succeeded.", errors)
193193
} else {
194194
format!("{}```\n{}```", errors, result)
195195
},

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)