mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Clean up warnings, add RojoTree into ServeSession
This commit is contained in:
parent
3e759b3e8e
commit
bb6ab74c19
9 changed files with 23 additions and 21 deletions
|
|
@ -1,23 +1,29 @@
|
|||
use std::collections::HashSet;
|
||||
|
||||
use crate::{project::Project, session_id::SessionId};
|
||||
use crate::{project::Project, session_id::SessionId, snapshot::RojoTree};
|
||||
|
||||
/// Contains all of the state for a Rojo serve session.
|
||||
pub struct ServeSession {
|
||||
root_project: Option<Project>,
|
||||
session_id: SessionId,
|
||||
tree: RojoTree,
|
||||
}
|
||||
|
||||
impl ServeSession {
|
||||
pub fn new(root_project: Option<Project>) -> ServeSession {
|
||||
pub fn new(tree: RojoTree, root_project: Option<Project>) -> ServeSession {
|
||||
let session_id = SessionId::new();
|
||||
|
||||
ServeSession {
|
||||
session_id,
|
||||
root_project,
|
||||
tree,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn tree(&self) -> &RojoTree {
|
||||
&self.tree
|
||||
}
|
||||
|
||||
pub fn session_id(&self) -> SessionId {
|
||||
self.session_id
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue