diff --git a/sdk/storage/examples/account00.rs b/sdk/storage/examples/account00.rs index f74bf76547..f09fa810f9 100644 --- a/sdk/storage/examples/account00.rs +++ b/sdk/storage/examples/account00.rs @@ -1,8 +1,8 @@ +use azure_core::error::Result; use azure_storage::core::prelude::*; -use std::error::Error; #[tokio::main] -async fn main() -> Result<(), Box> { +async fn main() -> Result<()> { // First we retrieve the account name and master key from environment variables. let account = std::env::var("STORAGE_ACCOUNT").expect("Set env variable STORAGE_ACCOUNT first!"); diff --git a/sdk/storage/src/account/requests/find_blobs_by_tags_builder.rs b/sdk/storage/src/account/requests/find_blobs_by_tags_builder.rs index d0e1be4427..dca6bafa38 100644 --- a/sdk/storage/src/account/requests/find_blobs_by_tags_builder.rs +++ b/sdk/storage/src/account/requests/find_blobs_by_tags_builder.rs @@ -1,5 +1,6 @@ use crate::account::responses::ListBlobsByTagsResponse; use crate::core::prelude::*; +use azure_core::error::Result; use azure_core::headers::add_optional_header; use azure_core::prelude::*; use std::convert::TryInto; @@ -40,9 +41,7 @@ impl<'a> FindBlobsByTagsBuilder<'a> { timeout: Timeout => Some(timeout), } - pub async fn execute( - &self, - ) -> Result> { + pub async fn execute(&self) -> Result { let mut url = self .client .storage_account_client() @@ -73,6 +72,6 @@ impl<'a> FindBlobsByTagsBuilder<'a> { debug!("response.headers() == {:#?}", response.headers()); - Ok((&response).try_into()?) + (&response).try_into() } } diff --git a/sdk/storage/src/account/requests/get_account_information_builder.rs b/sdk/storage/src/account/requests/get_account_information_builder.rs index 99be1cfa57..77e787d5bd 100644 --- a/sdk/storage/src/account/requests/get_account_information_builder.rs +++ b/sdk/storage/src/account/requests/get_account_information_builder.rs @@ -1,5 +1,6 @@ use crate::account::responses::GetAccountInformationResponse; use crate::core::prelude::*; +use azure_core::error::Result; #[derive(Debug, Clone)] pub struct GetAccountInformationBuilder<'a> { @@ -13,9 +14,7 @@ impl<'a> GetAccountInformationBuilder<'a> { } impl<'a> GetAccountInformationBuilder<'a> { - pub async fn execute( - self, - ) -> Result> { + pub async fn execute(self) -> Result { let mut url = self .storage_client .storage_account_client() @@ -40,8 +39,6 @@ impl<'a> GetAccountInformationBuilder<'a> { .execute_request_check_status(request, http::StatusCode::OK) .await?; - Ok(GetAccountInformationResponse::from_headers( - response.headers(), - )?) + GetAccountInformationResponse::from_headers(response.headers()) } }