Compare commits

...

2 commits

View file

@ -8,13 +8,13 @@ use std::fs::OpenOptions;
use std::io::Read; use std::io::Read;
use std::path::PathBuf; use std::path::PathBuf;
fn truncate(s: String, size: usize) -> String { fn truncate(string: String, size: usize) -> String {
if s.len() > size { if string.len() > size {
let mut s = s; let mut string = string;
s.truncate(size - 3); string.truncate(size - 3);
format!("{}...", s) format!("{}...", string)
} else { } else {
s string
} }
} }
@ -101,7 +101,7 @@ fn print_pull_request(pull_request: &PullRequest) {
fn print_pull_requests(pull_requests: &Vec<PullRequest>) { fn print_pull_requests(pull_requests: &Vec<PullRequest>) {
if pull_requests.is_empty() { 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 { for pull_request in pull_requests {
println!(); println!();