mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 15:20:17 +00:00
fix(options): clarify code that checks for --abc=123 option form
This commit is contained in:
@@ -72,11 +72,7 @@ pub trait OptionsRepresentable {
|
||||
let mut value = None;
|
||||
|
||||
// Check if the option is of the form --abc=123
|
||||
if option.contains("=") {
|
||||
let Some((part_key, part_value)) = option.split_once("=") else {
|
||||
bail!("invalid option: {option}");
|
||||
};
|
||||
|
||||
if let Some((part_key, part_value)) = option.split_once('=') {
|
||||
let part_key = part_key.to_string();
|
||||
let part_value = part_value.to_string();
|
||||
option = part_key;
|
||||
|
||||
Reference in New Issue
Block a user