fix(client): turn Rc into Arc

This commit is contained in:
Nova
2022-06-14 21:02:05 -04:00
parent 3421fa84af
commit 46a1581e1b
6 changed files with 33 additions and 37 deletions

View File

@@ -3,7 +3,7 @@ use crate::nodes::field;
use crate::nodes::spatial;
use libstardustxr::messenger::Messenger;
use mio::net::UnixStream;
use std::rc::Rc;
use std::sync::Arc;
pub struct Client {
pub messenger: Messenger,
@@ -11,8 +11,8 @@ pub struct Client {
}
impl Client {
pub fn from_connection(connection: UnixStream) -> Rc<Self> {
let client = Rc::new(Client {
pub fn from_connection(connection: UnixStream) -> Arc<Self> {
let client = Arc::new(Client {
messenger: Messenger::new(connection),
scenegraph: Default::default(),
});