mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Make SnapshotMiddleware::from_instance have a default impl
This commit is contained in:
parent
e46f9fd94f
commit
6d38a785ed
8 changed files with 14 additions and 53 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use std::{borrow::Cow, str};
|
||||
|
||||
use maplit::hashmap;
|
||||
use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
|
||||
use rbx_dom_weak::RbxValue;
|
||||
|
||||
use crate::{
|
||||
imfs::{FsResultExt, Imfs, ImfsEntry, ImfsFetcher},
|
||||
|
|
@ -11,7 +11,7 @@ use crate::{
|
|||
use super::{
|
||||
dir::SnapshotDir,
|
||||
meta_file::AdjacentMetadata,
|
||||
middleware::{SnapshotFileResult, SnapshotInstanceResult, SnapshotMiddleware},
|
||||
middleware::{SnapshotInstanceResult, SnapshotMiddleware},
|
||||
util::match_trailing,
|
||||
};
|
||||
|
||||
|
|
@ -48,17 +48,6 @@ impl SnapshotMiddleware for SnapshotLua {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn from_instance(tree: &RbxTree, id: RbxId) -> SnapshotFileResult {
|
||||
let instance = tree.get_instance(id).unwrap();
|
||||
|
||||
match instance.class_name.as_str() {
|
||||
"ModuleScript" | "LocalScript" | "Script" => {
|
||||
unimplemented!("Snapshotting Script instances")
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Core routine for turning Lua files into snapshots.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue