mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-11-22 08:56:58 -06:00
more cleanup
This commit is contained in:
parent
48ab34f577
commit
7da6b62c52
@ -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)))
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ packages:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.2.3"
|
||||
version: "0.2.4"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user