mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-23 14:15:24 +00:00
Thread InstanceSnapshotContext through all SnapshotMiddleware
This commit is contained in:
@@ -23,6 +23,7 @@ pub use self::error::*;
|
||||
use rbx_dom_weak::{RbxId, RbxTree};
|
||||
|
||||
use self::{
|
||||
context::InstanceSnapshotContext,
|
||||
csv::SnapshotCsv,
|
||||
dir::SnapshotDir,
|
||||
json_model::SnapshotJsonModel,
|
||||
@@ -43,10 +44,12 @@ macro_rules! middlewares {
|
||||
imfs: &mut Imfs<F>,
|
||||
entry: &ImfsEntry,
|
||||
) -> SnapshotInstanceResult<'static> {
|
||||
let context = InstanceSnapshotContext::default();
|
||||
|
||||
$(
|
||||
log::trace!("trying middleware {} on {}", stringify!($middleware), entry.path().display());
|
||||
|
||||
if let Some(snapshot) = $middleware::from_imfs(imfs, entry)? {
|
||||
if let Some(snapshot) = $middleware::from_imfs(&context, imfs, entry)? {
|
||||
log::trace!("middleware {} success on {}", stringify!($middleware), entry.path().display());
|
||||
return Ok(Some(snapshot));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user