|
9 | 9 | input_validators::{is_valid_pubkey, is_valid_signer},
|
10 | 10 | keypair::{pubkey_from_path, signer_from_path},
|
11 | 11 | },
|
| 12 | + solana_cli_output::OutputFormat, |
12 | 13 | solana_remote_wallet::remote_wallet::RemoteWalletManager,
|
13 | 14 | solana_sdk::{pubkey::Pubkey, signer::Signer},
|
14 | 15 | spl_single_pool::{self, find_pool_address},
|
@@ -61,7 +62,7 @@ pub struct Cli {
|
61 | 62 | conflicts_with = "verbose",
|
62 | 63 | value_parser = PossibleValuesParser::new(["json", "json-compact"]).map(|o| parse_output_format(&o)),
|
63 | 64 | )]
|
64 |
| - pub output_format: Option<OutputFormatArg>, |
| 65 | + pub output_format: Option<OutputFormat>, |
65 | 66 |
|
66 | 67 | #[clap(subcommand)]
|
67 | 68 | pub command: Command,
|
@@ -313,10 +314,10 @@ pub fn parse_address(path: &str, name: &str) -> Result<Pubkey, String> {
|
313 | 314 | }
|
314 | 315 | }
|
315 | 316 |
|
316 |
| -pub fn parse_output_format(output_format: &str) -> OutputFormatArg { |
| 317 | +pub fn parse_output_format(output_format: &str) -> OutputFormat { |
317 | 318 | match output_format {
|
318 |
| - "json" => OutputFormatArg::Json, |
319 |
| - "json-compact" => OutputFormatArg::JsonCompact, |
| 319 | + "json" => OutputFormat::Json, |
| 320 | + "json-compact" => OutputFormat::JsonCompact, |
320 | 321 | _ => unreachable!(),
|
321 | 322 | }
|
322 | 323 | }
|
@@ -451,10 +452,3 @@ pub fn with_signer(
|
451 | 452 | a => a,
|
452 | 453 | })
|
453 | 454 | }
|
454 |
| - |
455 |
| -// TODO replace with monorepo OutputFormat once it has Clone |
456 |
| -#[derive(Clone, Debug, PartialEq, Eq)] |
457 |
| -pub enum OutputFormatArg { |
458 |
| - Json, |
459 |
| - JsonCompact, |
460 |
| -} |
0 commit comments