diff --git a/python-pyo3/src/lib.rs b/python-pyo3/src/lib.rs index a6b5150f..d99ba0a4 100644 --- a/python-pyo3/src/lib.rs +++ b/python-pyo3/src/lib.rs @@ -31,7 +31,6 @@ fn all( .map_err(vault_error_to_anyhow)?; cli::list_all_keys(&vault).await?; - Ok(()) }) } @@ -51,7 +50,6 @@ fn delete( .map_err(vault_error_to_anyhow)?; cli::delete(&vault, key).await?; - Ok(()) }) } @@ -159,8 +157,7 @@ fn info( #[pyfunction(signature = (region=None, quiet=false))] fn id(region: Option, quiet: bool) -> PyResult<()> { Runtime::new()?.block_on(async { - cli::get_aws_account_id(region, quiet).await?; - + cli::print_aws_account_id(region, quiet).await?; Ok(()) }) } @@ -175,7 +172,6 @@ fn init( ) -> PyResult<()> { Runtime::new()?.block_on(async { cli::init_vault_stack(vault_stack.or(name), region, bucket, quiet).await?; - Ok(()) }) } diff --git a/rust/src/cli.rs b/rust/src/cli.rs index 6e90c769..c96c49a4 100644 --- a/rust/src/cli.rs +++ b/rust/src/cli.rs @@ -240,7 +240,7 @@ pub async fn decrypt( } /// Print the information from AWS STS "get caller identity" call. -pub async fn get_aws_account_id(region: Option, quiet: bool) -> Result<()> { +pub async fn print_aws_account_id(region: Option, quiet: bool) -> Result<()> { let config = crate::get_aws_config(region).await; let client = crate::aws_sts_client(&config); let result = client.get_caller_identity().send().await?; diff --git a/rust/src/main.rs b/rust/src/main.rs index f39d15f5..d168e58a 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -290,7 +290,7 @@ async fn run(args: Args) -> Result<()> { cli::generate_shell_completion(shell, Args::command(), install, args.quiet)?; } Command::Id {} => { - cli::get_aws_account_id(args.region, args.quiet).await?; + cli::print_aws_account_id(args.region, args.quiet).await?; } // All other commands can use the same single Vault Command::All {}