diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 14:33:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 14:38:16 +0900 |
| commit | 3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3 (patch) | |
| tree | 712ae7832124da20739f5b389cebe4f44abd7225 /crates/shirabe/src/command/search_command.rs | |
| parent | ac59538140a93d9a023da2115148bc9779223978 (diff) | |
| download | php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.tar.gz php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.tar.zst php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.zip | |
fix(compile): extract constants from traits to make them dyn-compatible
Diffstat (limited to 'crates/shirabe/src/command/search_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/search_command.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/shirabe/src/command/search_command.rs b/crates/shirabe/src/command/search_command.rs index 28f4fd1..3b0d52e 100644 --- a/crates/shirabe/src/command/search_command.rs +++ b/crates/shirabe/src/command/search_command.rs @@ -8,7 +8,7 @@ use crate::plugin::command_event::CommandEvent; use crate::plugin::plugin_events::PluginEvents; use crate::repository::composite_repository::CompositeRepository; use crate::repository::platform_repository::PlatformRepository; -use crate::repository::repository_interface::RepositoryInterface; +use crate::repository::repository_interface::{self, RepositoryInterface}; use crate::{command::base_command::BaseCommand, composer::Composer}; use anyhow::Result; use indexmap::IndexMap; @@ -98,7 +98,7 @@ impl SearchCommand { .get_event_dispatcher() .dispatch(command_event.get_name(), &command_event); - let mut mode: i64 = RepositoryInterface::SEARCH_FULLTEXT; + let mut mode: i64 = repository_interface::SEARCH_FULLTEXT; if input.get_option("only-name").as_bool().unwrap_or(false) { if input.get_option("only-vendor").as_bool().unwrap_or(false) { return Err(InvalidArgumentException { @@ -107,9 +107,9 @@ impl SearchCommand { } .into()); } - mode = RepositoryInterface::SEARCH_NAME; + mode = repository_interface::SEARCH_NAME; } else if input.get_option("only-vendor").as_bool().unwrap_or(false) { - mode = RepositoryInterface::SEARCH_VENDOR; + mode = repository_interface::SEARCH_VENDOR; } let r#type = input @@ -127,7 +127,7 @@ impl SearchCommand { }) .unwrap_or_default(); let mut query = implode(" ", &token_strings); - if mode != RepositoryInterface::SEARCH_FULLTEXT { + if mode != repository_interface::SEARCH_FULLTEXT { query = preg_quote(&query, None); } |
