From 7da6b62c524a6edad49b57abf13e13aa7d5359c4 Mon Sep 17 00:00:00 2001 From: Christien Rioux Date: Sat, 21 Oct 2023 18:51:16 -0400 Subject: [PATCH] more cleanup --- veilid-core/src/rpc_processor/destination.rs | 12 ++++++------ veilid-flutter/example/pubspec.lock | 2 +- veilid-tools/src/wasm.rs | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/veilid-core/src/rpc_processor/destination.rs b/veilid-core/src/rpc_processor/destination.rs index 609cd07d..cdee2666 100644 --- a/veilid-core/src/rpc_processor/destination.rs +++ b/veilid-core/src/rpc_processor/destination.rs @@ -189,9 +189,9 @@ impl RPCProcessor { .to_rpc_network_result()?); // Get the assembled route for response - let private_route = rss + let private_route = network_result_try!(rss .assemble_private_route(&pr_key, None) - .map_err(RPCError::internal)?; + .to_rpc_network_result()?); Ok(NetworkResult::Value(RespondTo::PrivateRoute(private_route))) } @@ -216,9 +216,9 @@ impl RPCProcessor { .to_rpc_network_result()?); // Get the assembled route for response - let private_route = rss + let private_route = network_result_try!(rss .assemble_private_route(&pr_key, None) - .map_err(RPCError::internal)?; + .to_rpc_network_result()?); Ok(NetworkResult::Value(RespondTo::PrivateRoute(private_route))) } @@ -282,9 +282,9 @@ impl RPCProcessor { }; // Get the assembled route for response - let private_route = rss + let private_route = network_result_try!(rss .assemble_private_route(&pr_key, None) - .map_err(RPCError::internal)?; + .to_rpc_network_result()?); Ok(NetworkResult::Value(RespondTo::PrivateRoute(private_route))) } diff --git a/veilid-flutter/example/pubspec.lock b/veilid-flutter/example/pubspec.lock index 8d0b8994..71b84459 100644 --- a/veilid-flutter/example/pubspec.lock +++ b/veilid-flutter/example/pubspec.lock @@ -403,7 +403,7 @@ packages: path: ".." relative: true source: path - version: "0.2.3" + version: "0.2.4" web: dependency: transitive description: diff --git a/veilid-tools/src/wasm.rs b/veilid-tools/src/wasm.rs index 4786f78e..1d198fb3 100644 --- a/veilid-tools/src/wasm.rs +++ b/veilid-tools/src/wasm.rs @@ -18,21 +18,21 @@ extern "C" { pub fn is_browser() -> bool { static CACHE: AtomicI8 = AtomicI8::new(-1); - let cache = CACHE.load(Ordering::AcqRel); + let cache = CACHE.load(Ordering::Acquire); if cache != -1 { return cache != 0; } let res = Reflect::has(global().as_ref(), &"navigator".into()).unwrap_or_default(); - CACHE.store(res as i8, Ordering::AcqRel); + CACHE.store(res as i8, Ordering::Release); res } pub fn is_browser_https() -> bool { static CACHE: AtomicI8 = AtomicI8::new(-1); - let cache = CACHE.load(Ordering::AcqRel); + let cache = CACHE.load(Ordering::Acquire); if cache != -1 { return cache != 0; } @@ -41,7 +41,7 @@ pub fn is_browser_https() -> bool { .map(|res| res.is_truthy()) .unwrap_or_default(); - CACHE.store(res as i8, Ordering::AcqRel); + CACHE.store(res as i8, Ordering::Release); res }