Skip to content

Commit

Permalink
garden inspect: use is_empty() instead of len() > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
davvid committed Dec 24, 2023
1 parent 24c6871 commit edb14b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmds/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ fn print_extended_tree_details(
Some(config_id) => app_context.get_config(config_id),
None => app_context.get_root_config(),
};
if tree.description.len() > 0 {
if !tree.description.is_empty() {
println!("{}", Color::cyan(&tree.description));
}
if tree.is_worktree && !display_worktrees {
return;
}
if tree.remotes.len() > 0 {
if !tree.remotes.is_empty() {
println!("{}", Color::blue("remotes:"));
for (name, remote) in &tree.remotes {
let value = eval::tree_value(
Expand All @@ -162,7 +162,7 @@ fn print_extended_tree_details(
);
}
}
if tree.links.len() > 0 {
if !tree.links.is_empty() {
println!("{}", Color::blue("links:"));
for link in &tree.links {
let value = eval::tree_value(
Expand Down

0 comments on commit edb14b7

Please sign in to comment.