aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/show_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/show_command.rs')
-rw-r--r--crates/shirabe/src/command/show_command.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/crates/shirabe/src/command/show_command.rs b/crates/shirabe/src/command/show_command.rs
index 34b84fd8..3cc80b4c 100644
--- a/crates/shirabe/src/command/show_command.rs
+++ b/crates/shirabe/src/command/show_command.rs
@@ -1489,8 +1489,8 @@ impl Command for ShowCommand {
} else if input
.borrow()
.get_option("ignore")?
- .as_list()
- .map_or(0, |l| l.len())
+ .as_array()
+ .map_or(0, <[String]>::len)
> 0
{
self.get_io().write_error("<warning>You are using the option \"ignore\" for action other than \"outdated\", it will be ignored.</warning>");
@@ -2180,12 +2180,8 @@ impl Command for ShowCommand {
&input
.borrow()
.get_option("ignore")?
- .as_list()
- .map(|l| {
- l.iter()
- .filter_map(|v| v.as_string().map(strtolower))
- .collect::<Vec<_>>()
- })
+ .as_array()
+ .map(|l| l.iter().map(|v| strtolower(v)).collect::<Vec<_>>())
.unwrap_or_default(),
"{^(?:%s)$}iD",
);