Skip to content

Commit ccc2464

Browse files
committed
chore(config): use any instead of find
1 parent b548ad0 commit ccc2464

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn print(program: ProgramInfo) {
8181
None => panic!("Cannot get config path"),
8282
Some(path) => path,
8383
};
84-
let detail = args.iter().find(|&arg| arg == "--detail" || arg == "-d").is_some();
84+
let detail = args.iter().any(|arg| arg == "--detail" || arg == "-d");
8585

8686
println!("Config path: [{}]", path);
8787
println!("Projects:");
@@ -106,7 +106,7 @@ pub fn print(program: ProgramInfo) {
106106

107107
print!("\t\t\t\t{}", name);
108108

109-
if detail == true {
109+
if detail {
110110
let current_branch = git_current_branch(repository.to_path_buf());
111111
// TODO properly handle the perfect alignment of the tabs
112112
println!(" \t\t-> {}", current_branch);

0 commit comments

Comments
 (0)