From c3893ea25d6b9284c993a6ebb0f3c1a1fd540739 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Thu, 19 Dec 2024 08:07:15 +0100 Subject: [PATCH] unnecessary DfxResult --- src/dfx/src/lib/environment.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/dfx/src/lib/environment.rs b/src/dfx/src/lib/environment.rs index 9aa770853a..2b701f233d 100644 --- a/src/dfx/src/lib/environment.rs +++ b/src/dfx/src/lib/environment.rs @@ -333,7 +333,7 @@ impl<'a> AgentEnvironment<'a> { let url = format!("http://{}", socket_addr); let url = Url::parse(&url) .map_err(|e| UriError::UrlParseError(url.to_string(), e))?; - Some(create_pocketic(&url)?) + Some(create_pocketic(&url)) } None => None, } @@ -455,8 +455,6 @@ pub fn create_agent( Ok(agent) } -#[context("Failed to create PocketIC handle with url {}.", url)] -pub fn create_pocketic(url: &Url) -> DfxResult { - let pocketic = PocketIc::new_from_existing_instance(url.clone(), 0, None); - Ok(pocketic) +pub fn create_pocketic(url: &Url) -> PocketIc { + PocketIc::new_from_existing_instance(url.clone(), 0, None) }