aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/remove_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/remove_command.rs')
-rw-r--r--crates/shirabe/src/command/remove_command.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/shirabe/src/command/remove_command.rs b/crates/shirabe/src/command/remove_command.rs
index ab322f9..49b21dc 100644
--- a/crates/shirabe/src/command/remove_command.rs
+++ b/crates/shirabe/src/command/remove_command.rs
@@ -477,7 +477,7 @@ impl RemoveCommand {
let allow_plugins = composer.get_config().borrow_mut().get("allow-plugins");
let removed_plugins: Vec<String> =
- if let Some(allow_map) = allow_plugins.as_ref().and_then(|v| v.as_array()) {
+ if let Some(allow_map) = allow_plugins.as_opt().and_then(|v| v.as_array()) {
packages
.iter()
.filter(|p| allow_map.contains_key(p.as_str()))
@@ -488,11 +488,11 @@ impl RemoveCommand {
};
if !dry_run
- && allow_plugins.as_ref().and_then(|v| v.as_array()).is_some()
+ && allow_plugins.as_opt().and_then(|v| v.as_array()).is_some()
&& !removed_plugins.is_empty()
{
let allow_map_len = allow_plugins
- .as_ref()
+ .as_opt()
.and_then(|v| v.as_array())
.map(|m| m.len())
.unwrap_or(0);