Compare commits
2 commits
e05823a4d9
...
06c01356e8
Author | SHA1 | Date | |
---|---|---|---|
06c01356e8 | |||
195d5f0770 |
1 changed files with 7 additions and 7 deletions
14
src/main.rs
14
src/main.rs
|
@ -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!();
|
||||||
|
|
Loading…
Reference in a new issue