diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-27 03:52:05 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-27 04:21:34 +0900 |
| commit | 2b51554ff59d1e5cbf8dd2db65d278b0202a9102 (patch) | |
| tree | f4d9b0abf4df9b5e363e3bd65511d70e3d5ada00 /crates/shirabe-external-packages/src/symfony/console/input/argv_input.rs | |
| parent | cc07b5abb83a40d678401c335bdc49bb81b72c5f (diff) | |
| download | php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.tar.gz php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.tar.zst php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.zip | |
refactor: fix compiler warnings and clippy warnings
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/input/argv_input.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/input/argv_input.rs | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/input/argv_input.rs b/crates/shirabe-external-packages/src/symfony/console/input/argv_input.rs index 54a5f3a..c1a708a 100644 --- a/crates/shirabe-external-packages/src/symfony/console/input/argv_input.rs +++ b/crates/shirabe-external-packages/src/symfony/console/input/argv_input.rs @@ -270,10 +270,10 @@ impl ArgvInput { format!( "No arguments expected for \"{}\" command, got \"{}\".", symfony_command_name.clone().unwrap(), - token.to_string(), + token, ) } else { - format!("No arguments expected, got \"{}\".", token.to_string()) + format!("No arguments expected, got \"{}\".", token) }; return Err( @@ -288,7 +288,7 @@ impl ArgvInput { fn add_short_option(&mut self, shortcut: &str, value: PhpMixed) -> anyhow::Result<()> { if !self.inner.definition.has_shortcut(shortcut) { return Err(RuntimeException(shirabe_php_shim::RuntimeException { - message: format!("The \"-{}\" option does not exist.", shortcut.to_string()), + message: format!("The \"-{}\" option does not exist.", shortcut), code: 0, }) .into()); @@ -308,7 +308,7 @@ impl ArgvInput { if !self.inner.definition.has_option(name) { if !self.inner.definition.has_negation(name) { return Err(RuntimeException(shirabe_php_shim::RuntimeException { - message: format!("The \"--{}\" option does not exist.", name.to_string()), + message: format!("The \"--{}\" option does not exist.", name), code: 0, }) .into()); @@ -317,10 +317,7 @@ impl ArgvInput { let option_name = self.inner.definition.negation_to_name(name)?; if !matches!(value, PhpMixed::Null) { return Err(RuntimeException(shirabe_php_shim::RuntimeException { - message: format!( - "The \"--{}\" option does not accept a value.", - name.to_string(), - ), + message: format!("The \"--{}\" option does not accept a value.", name,), code: 0, }) .into()); @@ -336,10 +333,7 @@ impl ArgvInput { if !matches!(value, PhpMixed::Null) && !option.accept_value() { return Err(RuntimeException(shirabe_php_shim::RuntimeException { - message: format!( - "The \"--{}\" option does not accept a value.", - name.to_string(), - ), + message: format!("The \"--{}\" option does not accept a value.", name,), code: 0, }) .into()); @@ -364,7 +358,7 @@ impl ArgvInput { if matches!(value, PhpMixed::Null) { if option.is_value_required() { return Err(RuntimeException(shirabe_php_shim::RuntimeException { - message: format!("The \"--{}\" option requires a value.", name.to_string()), + message: format!("The \"--{}\" option requires a value.", name), code: 0, }) .into()); |
