Compare commits

...

2 commits

View file

@ -8,13 +8,13 @@ use std::fs::OpenOptions;
use std::io::Read;
use std::path::PathBuf;
fn truncate(s: String, size: usize) -> String {
if s.len() > size {
let mut s = s;
s.truncate(size - 3);
format!("{}...", s)
fn truncate(string: String, size: usize) -> String {
if string.len() > size {
let mut string = string;
string.truncate(size - 3);
format!("{}...", string)
} else {
s
string
}
}
@ -101,7 +101,7 @@ fn print_pull_request(pull_request: &PullRequest) {
fn print_pull_requests(pull_requests: &Vec<PullRequest>) {
if pull_requests.is_empty() {
println!("\x1b[31;1mNo pull requests\x1b[0m");
println!("\x1b[92;1mNo pull requests\x1b[0m");
}
for pull_request in pull_requests {
println!();