fix bug in show
This commit is contained in:
+7
-2
@@ -170,11 +170,16 @@ impl Pacdef {
|
||||
}
|
||||
|
||||
fn show_group_content(&self, groups: &ArgMatches) -> Result<()> {
|
||||
let groups = groups.get_many::<String>("group").unwrap();
|
||||
for arg_group in groups {
|
||||
let mut iter = groups.get_many::<String>("group").unwrap().peekable();
|
||||
|
||||
while let Some(arg_group) = iter.next() {
|
||||
let group = self.groups.iter().find(|g| g.name == *arg_group).unwrap();
|
||||
println!("{group}");
|
||||
if iter.peek().is_some() {
|
||||
println!();
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user