This commit is contained in:
parent
311755c812
commit
a8d97ce0b3
30 changed files with 182 additions and 108 deletions
|
|
@ -12,7 +12,8 @@ static mut VFS_CLIENT: Option<VFSClient> = None;
|
|||
|
||||
fn get_client() -> &'static mut VFSClient {
|
||||
unsafe {
|
||||
if let None = VFS_CLIENT {
|
||||
#[allow(static_mut_refs)]
|
||||
if VFS_CLIENT.is_none() {
|
||||
let endpoint_cap = yellowstone_yunq::from_init_endpoint()
|
||||
.get_endpoint(&yellowstone_yunq::GetEndpointRequest {
|
||||
endpoint_name: "victoriafalls".to_string(),
|
||||
|
|
@ -21,6 +22,7 @@ fn get_client() -> &'static mut VFSClient {
|
|||
|
||||
VFS_CLIENT = Some(VFSClient::new(Capability::take(endpoint_cap.endpoint)));
|
||||
}
|
||||
#[allow(static_mut_refs)]
|
||||
VFS_CLIENT.as_mut().unwrap()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue